A Faker.js Plugin for Beau
Go to file
David Diaz a69cacdf5e Intial commit. 2018-05-16 22:44:35 -06:00
examples Intial commit. 2018-05-16 22:44:35 -06:00
.gitignore Intial commit. 2018-05-16 22:44:35 -06:00
.prettierrc Intial commit. 2018-05-16 22:44:35 -06:00
README.md Intial commit. 2018-05-16 22:44:35 -06:00
index.js Intial commit. 2018-05-16 22:44:35 -06:00
package-lock.json Intial commit. 2018-05-16 22:44:35 -06:00
package.json Intial commit. 2018-05-16 22:44:35 -06:00

README.md

Beau Faker

Beau-faker allows you to use faker.js from within Beau.

Installation

npm i -g beau-faker

Don't forget to add faker to your Beau plugins.

Usage

You can let beau know you are using faked values within a request by adding the FakeIt key and setting it to true.

endpoint: http://httpbin.org

plugins:
  - faker

POST /anything:
  alias: anything
  fakeIt: true
  payload:
    name:
      first: '{{name.firstName}}'
      last: '{{name.lastName}}'

    address: '{{address.city}}, {{address.state}}'

When set to fakeIt is set to true beau will run Faker.faker on every value within that request.