Remove reference to this so that Faker.Internet.email and domainName can be used without having to bind the function receiver with Faker.Internet.email.bind(Faker.Internet).
Before:
var factory = require('factory-girl'),
User = require('src/models/User');
factory.define('User', User, {
given_name: Faker.Name.firstName,
surname: Faker.Name.lastName,
email: Faker.Internet.email.bind(Faker.Internet)
});
After:
var factory = require('factory-girl'),
User = require('src/models/User');
factory.define('User', User, {
given_name: Faker.Name.firstName,
surname: Faker.Name.lastName,
email: Faker.Internet.email
});
Remove reference to
this
so that Faker.Internet.email and domainName can be used without having to bind the function receiver withFaker.Internet.email.bind(Faker.Internet)
.Before:
After: