I am looking to return an array of emails in my Ember mirage factory using faker.js.
Here's the code snippet,
import { Factory } from 'ember-cli-mirage';
export default Factory.extend({
body() { return faker.lorem.sentence(); },
emails: [
"abc@123.com",
"def@456.com",
]
});
I want to use faker to dynamically create emails array. This is already raised as an issue in fakerjs github. But the suggested workaround cannot be applied to this case.
Please help.
Aucun commentaire:
Enregistrer un commentaire