How to use the ember-cli-mirage.faker.address function in ember-cli-mirage

To help you get started, we’ve selected a few ember-cli-mirage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github api-hogs / ember-data-offline / tests / dummy / app / mirage / factories / office.js View on Github external
import Mirage, {faker} from 'ember-cli-mirage';

export default Mirage.Factory.extend({
  address: faker.address.streetAddress,
  company: function(i) {
    let id = i + 1;
    return id;
  },
  city: function(i) {
    let id = i + 1;
    return id;
  },
});
github ember-admin / ember-cli-admin / tests / dummy / app / mirage / factories / user.js View on Github external
import Mirage, { faker } from 'ember-cli-mirage';

export default Mirage.Factory.extend({
  name: faker.name.findName(),
  lat: faker.address.latitude(),
  long: faker.address.longitude(),
  email: faker.internet.email(),
  zoom: 3,
  birthdate: faker.date.past(),
  avatar_id: function(i) {
    return i + 1;
  }
});
github offirgolan / ember-light-table / tests / dummy / mirage / factories / user.js View on Github external
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)
});
github api-hogs / ember-data-offline / tests / dummy / app / mirage / factories / city.js View on Github external
import Mirage, { faker } from 'ember-cli-mirage';

export default Mirage.Factory.extend({
  name: faker.address.city,
  office: function(i) {
    let office = {
      id: i + 1,
      address: faker.address.country(),
      city: i + 1,
      company: i + 1
    };
    return office;
  }
});
github ember-admin / ember-cli-admin / tests / dummy / app / mirage / factories / user.js View on Github external
import Mirage, { faker } from 'ember-cli-mirage';

export default Mirage.Factory.extend({
  name: faker.name.findName(),
  lat: faker.address.latitude(),
  long: faker.address.longitude(),
  email: faker.internet.email(),
  zoom: 3,
  birthdate: faker.date.past(),
  avatar_id: function(i) {
    return i + 1;
  }
});
github api-hogs / ember-data-offline / tests / dummy / app / mirage / factories / city.js View on Github external
office: function(i) {
    let office = {
      id: i + 1,
      address: faker.address.country(),
      city: i + 1,
      company: i + 1
    };
    return office;
  }
});
github hummingbird-me / hummingbird-client / mirage / factories / user.js View on Github external
  location() { return faker.address.country(); },
  password() { return faker.internet.password(); },
github CenterForOpenScience / ember-osf-web / mirage / factories / meeting.ts View on Github external
location() {
        return faker.random.arrayElement([
            `${faker.address.city()}, ${faker.address.stateAbbr()}, USA`,
            `${faker.address.city()}, ${faker.address.country()}`,
        ]);
    },
    startDate() {
github NYCPlanning / labs-zap-search / mirage / factories / project.js View on Github external
dcpProjectname() {
    return `
      ${faker.random.arrayElement([faker.address.streetName(), faker.company.companyName()])}
      ${faker.random.arrayElement(['Rezoning', faker.address.streetSuffix()])}
    `;
  },