Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
modifyTime: () => faker.date.past(2 / 365, REF_TIME) * 1000000,
dateModified() {
return faker.date.past(3);
},
modified: false,
const generate = name => {
const detected = Math.random() > 0.3;
const healthy = detected && Math.random() > 0.3;
const attributes = {
[`driver.${name}.version`]: '1.0.0',
[`driver.${name}.status`]: 'awesome',
[`driver.${name}.more.details`]: 'yeah',
[`driver.${name}.more.again`]: 'we got that',
};
return {
Detected: detected,
Healthy: healthy,
HealthDescription: healthy ? 'Driver is healthy' : 'Uh oh',
UpdateTime: faker.date.past(5 / 365, REF_DATE),
Attributes: Math.random() > 0.3 && detected ? attributes : null,
};
};
endDate() {
return faker.date.past(5, new Date(2020, 0, 0));
},
logoUrl() {
requireProgressBy: () => faker.date.past(0.5 / 365, REF_TIME),
import Mirage, {faker} from 'ember-cli-mirage';
export default Mirage.Factory.extend({
initials: function() {
return faker.hacker.abbreviation().substring(0,3).toUpperCase();
},
score: function() {
return faker.random.number({
'min': 10,
'max': 100
});
},
createdAt: faker.date.past
});
datetimeUpdated() {
return faker.date.past(2, new Date(2018, 0, 0));
},
createTime() {
return faker.date.past(2 / 365, new Date(this.modifyTime / 1000000)) * 1000000;
},
dateCreated() {
return faker.date.past(1, new Date(2015, 0, 0));
},
currentUserCanComment: true,
dateWithdrawn() {
return faker.date.past(1, new Date(2019, 0, 0));
},
},