diff options
| author | Marak <[email protected]> | 2018-10-17 14:00:33 -0400 |
|---|---|---|
| committer | Marak <[email protected]> | 2018-10-17 18:04:44 -0400 |
| commit | ef59eca978b91b25cb26ca958cd5aa9ad15b0a31 (patch) | |
| tree | 2259b758e701b907f9a200acfb58353f61d8c6e8 /test | |
| parent | 09b736782621b88e779cc43903b6e2f389ae87a7 (diff) | |
| download | faker-ef59eca978b91b25cb26ca958cd5aa9ad15b0a31.tar.xz faker-ef59eca978b91b25cb26ca958cd5aa9ad15b0a31.zip | |
[test] `faker.fake` now at 100% code coverage
Diffstat (limited to 'test')
| -rw-r--r-- | test/fake.unit.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/fake.unit.js b/test/fake.unit.js index e541d938..6a802ec4 100644 --- a/test/fake.unit.js +++ b/test/fake.unit.js @@ -27,5 +27,25 @@ describe("fake.js", function () { var random = faker.fake('{{helpers.randomize(["one", "two", "three"])}}'); assert.ok(arr.indexOf(random) > -1); }); + + it("does not allow undefined parameters", function () { + assert.throws(function () { + faker.fake() + }, Error); + }); + + it("does not allow invalid module name", function () { + assert.throws(function () { + faker.fake('{{foo.bar}}') + }, Error); + }); + + it("does not allow invalid method name", function () { + assert.throws(function () { + faker.fake('{{address.foo}}') + }, Error); + }); + + }); }); |
