open-nomad/ui/mirage/factories/task-event.js
2018-05-25 10:15:24 -07:00

16 lines
415 B
JavaScript

import { Factory, faker } from 'ember-cli-mirage';
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.list.random(...STATES),
signal: () => '',
exitCode: () => null,
time: () => faker.date.past(2 / 365, REF_TIME) * 1000000,
displayMessage: () => faker.lorem.sentence(),
});