open-nomad/ui/mirage/factories/task-event.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
460 B
JavaScript
Raw Normal View History

2019-09-26 18:47:07 +00:00
import { Factory } from 'ember-cli-mirage';
import faker from 'nomad-ui/mirage/faker';
2017-09-19 14:47:10 +00:00
import { provide } from '../utils';
const REF_TIME = new Date();
const STATES = provide(10, faker.system.fileExt.bind(faker.system));
export default Factory.extend({
type: () => faker.helpers.randomize(STATES),
2017-09-19 14:47:10 +00:00
signal: () => '',
exitCode: () => null,
time: () => faker.date.past(2 / 365, REF_TIME) * 1000000,
displayMessage: () => faker.lorem.sentence(),
2017-09-19 14:47:10 +00:00
});