Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/tylerreichle/faker.js int…
Browse files Browse the repository at this point in the history
…o add-vehicle
  • Loading branch information
tylerreichle committed Oct 21, 2018
2 parents 4b76433 + b78fdff commit 031ad23
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions build/src/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ See: https://github.com/pateketrueke/json-schema-faker/
Run faker generators from Command Line.
See: https://github.com/lestoni/faker-cli

### Mocker data generator

Minimal JSON data generator, fakerJs is one of the providers.
See: https://github.com/danibram/mocker-data-generator

**Want to see your project added here? Let us know!**

### Meteor
Expand Down
2 changes: 1 addition & 1 deletion lib/company.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var Company = function (faker) {
* @method faker.company.bs
*/
this.bs = function () {
return f('{{company.bsAdjective}} {{company.bsBuzz}} {{company.bsNoun}}');
return f('{{company.bsBuzz}} {{company.bsAdjective}} {{company.bsNoun}}');
}

/**
Expand Down
10 changes: 5 additions & 5 deletions test/company.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,22 @@ describe("company.js", function () {
});

describe("bs()", function () {
it("returns phrase comprising of a BS adjective, buzz, and noun", function () {
it("returns phrase comprising of a BS buzz, adjective, and noun", function () {
sinon.spy(faker.random, 'arrayElement');
sinon.spy(faker.company, 'bsAdjective');
sinon.spy(faker.company, 'bsBuzz');
sinon.spy(faker.company, 'bsAdjective');
sinon.spy(faker.company, 'bsNoun');
var bs = faker.company.bs();

assert.ok(typeof bs === 'string');
assert.ok(faker.random.arrayElement.calledThrice);
assert.ok(faker.company.bsAdjective.calledOnce);
assert.ok(faker.company.bsBuzz.calledOnce);
assert.ok(faker.company.bsAdjective.calledOnce);
assert.ok(faker.company.bsNoun.calledOnce);

faker.random.arrayElement.restore();
faker.company.bsAdjective.restore();
faker.random.arrayElement.restore();
faker.company.bsBuzz.restore();
faker.company.bsAdjective.restore();
faker.company.bsNoun.restore();
});
});
Expand Down

0 comments on commit 031ad23

Please sign in to comment.