It worked very nicely for generating content for people profiles, including names, lorem ipsum snippets (paragraphs, words, sentences, slugs, etc.), phone numbers, etc.
Process was to:
Run npm install faker --save to include in package.json
Include const Faker = require('faker'); at the top of your test file
In your test, you can generate random data using format Faker.<lib name>.<method()>; so for example:
var firstName = Faker.name.firstName();
var lastName = Faker.name.lastName();
var summary = Faker.lorem.paragraph();
var teaser = Faker.lorem.sentence();
Recommend installing Faker.js so we can generate fake data for tests.
Ended up doing this locally while writing tests related to https://github.com/ccswbs/hjckrrh/issues/739.
It worked very nicely for generating content for people profiles, including names, lorem ipsum snippets (paragraphs, words, sentences, slugs, etc.), phone numbers, etc.
Process was to:
npm install faker --save
to include in package.jsonconst Faker = require('faker');
at the top of your test fileFaker.<lib name>.<method()>;
so for example: