Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import Mirage/* , {faker} */ from 'ember-cli-mirage';
export default Mirage.Factory.extend({
content: 'Hello log\nSecond line'
});
/*
This is an example factory definition.
Create more files in this directory to define additional factories.
*/
import Mirage, { faker } from 'ember-cli-mirage';
faker.locale = 'en_US';
const MATERIAL_UI_COLORS = ['#F44336', '#E91E63', '#9C27B0', '#009688', '#2196F3', '#4CAF50', '#FFC107', '#FF5722', '#607D8B'];
export default Mirage.Factory.extend({
firstName: faker.name.firstName,
lastName: faker.name.firstName,
company: faker.company.companyName,
address: faker.address.streetAddress,
country: faker.address.country,
state: faker.address.state,
email: faker.internet.email,
username: faker.internet.userName,
avatar: faker.internet.avatar,
bio: faker.lorem.paragraph,
color: () => faker.random.arrayElement(MATERIAL_UI_COLORS)
});
import Mirage from 'ember-cli-mirage';
export default Mirage.Factory.extend({
name: i => `User ${i}`,
twitter: i => `@user-${i}`,
clients: []
});
import Mirage/*, {faker} */ from 'ember-cli-mirage';
export default Mirage.Factory.extend({
name(i) {return `Employee ${i}`;}
});
import Mirage from 'ember-cli-mirage';
export default Mirage.Factory.extend({
title: (i) => `role ${i}`,
});
import Mirage from 'ember-cli-mirage';
export default Mirage.Factory.extend({
accessibility() { return null; },
bio() { return null; },
cover() { return null; },
created_at() { return '2015-09-02T13:41:50.000Z'; },
created_by() { return null; },
email(i) { return `user-${i}@example.com`; },
image() { return '//www.gravatar.com/avatar/3ae045bc198a157401827c8455cd7c99?s=250&d=mm&r=x'; },
language() { return 'en_US'; },
last_login() { return '2015-11-02T16:12:05.000Z'; },
location() { return null; },
meta_description() { return null; },
meta_title() { return null; },
name(i) { return `User ${i}`; },
slug(i) { return `user-${i}`; },
status() { return 'active'; },
tour() { return null; },
import Mirage from 'ember-cli-mirage';
export default Mirage.Factory.extend({
name: (i) => `event ${i}`,
isPublished: false,
isScheduled: false,
instructors: []
});
import Mirage from 'ember-cli-mirage';
export default Mirage.Factory.extend({
description: (i) => `descirption for sequence ${i} `,
report: (i) => (i+1),
});
/**
* This is a factory definition for a gist file
*/
import Mirage from 'ember-cli-mirage';
export default Mirage.Factory.extend({
type() {
if (!this.filename) {
return "";
}
let extension = this.filename.substring(this.filename.lastIndexOf("."), this.filename.length);
switch (extension) {
case ".hbs":
return "text/plain";
case ".css":
return "text/css";
case ".js":
return "application/javascript";
case ".json":
return "application/json";
}
},
import Mirage/*, {faker} */ from 'ember-cli-mirage';
export default Mirage.Factory.extend({
content: 'Hello log'
});