diff options
| author | Marak <[email protected]> | 2015-07-05 00:35:41 -0700 |
|---|---|---|
| committer | Marak <[email protected]> | 2015-07-05 00:35:41 -0700 |
| commit | edccd6c227773207d7e9555f2cdb466c6baf04d3 (patch) | |
| tree | 7d38c13fd862d3b5d381355e845d5aaf5bef9919 | |
| parent | bed4ad42a757dede874298084845b5a401a9d9c1 (diff) | |
| download | faker-edccd6c227773207d7e9555f2cdb466c6baf04d3.tar.xz faker-edccd6c227773207d7e9555f2cdb466c6baf04d3.zip | |
[fix] [minor] Typo
| -rw-r--r-- | lib/name.js | 2 | ||||
| -rw-r--r-- | test/name.unit.js | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/lib/name.js b/lib/name.js index c191c681..53ba2b50 100644 --- a/lib/name.js +++ b/lib/name.js @@ -64,7 +64,7 @@ var _name = { job = faker.random.array_element(faker.definitions.name.title.job); return descriptor + " " + level + " " + job; - } + }, jobDescriptor: function () { return faker.random.array_element(faker.definitions.name.title.descriptor); diff --git a/test/name.unit.js b/test/name.unit.js index ce4936f4..bd3d4c23 100644 --- a/test/name.unit.js +++ b/test/name.unit.js @@ -69,14 +69,17 @@ describe("name.js", function () { }); describe("title()", function () { - it("returns a random title", function () { - sinon.stub(faker.name, 'title').returns('Lead Solutions Supervisor'); + it("returns a random title", function () { + sinon.stub(faker.name, 'title').returns('Lead Solutions Supervisor'); - var title = faker.name.title(); + var title = faker.name.title(); - assert.equal(title, 'Lead Solutions Supervisor'); + assert.equal(title, 'Lead Solutions Supervisor'); + + faker.name.title.restore(); + }); + }); - faker.name.title.restore(); describe("jobTitle()", function () { it("returns a job title consisting of a descriptor, area, and type", function () { sinon.spy(faker.random, 'array_element'); |
