5da134d074
This sets a default-but-query-configurable Faker seed in development, via faker-seed. It also changes uses of Math.random to use Faker’s randomness so auto-generated data remains stable in development.
15 lines
270 B
JavaScript
15 lines
270 B
JavaScript
import { Factory } from 'ember-cli-mirage';
|
|
|
|
import faker from 'nomad-ui/mirage/faker';
|
|
|
|
export default Factory.extend({
|
|
id: i => (i === 0 ? 'default' : `namespace-${i}`),
|
|
|
|
name() {
|
|
return this.id;
|
|
},
|
|
|
|
hash: () => faker.random.uuid(),
|
|
description: '',
|
|
});
|