Installs Faker.js module. Provides fake data (e.g. firstname, lastname, email, lorem ipsum, etc.) for tests.
Once installed on an environment, remember to run npm install and npm install --only=dev in the project directory to include the library.
To use in code:
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();
Fixes #41
Installs Faker.js module. Provides fake data (e.g. firstname, lastname, email, lorem ipsum, etc.) for tests.
Once installed on an environment, remember to run
npm install
andnpm install --only=dev
in the project directory to include the library.To use in code:
const Faker = require('faker');
at the top of your test fileFaker.<lib name>.<method()>;
so for example: