diff options
| author | Brandon Dail <[email protected]> | 2015-07-15 13:31:51 -0500 |
|---|---|---|
| committer | Brandon Dail <[email protected]> | 2015-07-15 13:31:51 -0500 |
| commit | 40c13f210afd9a2cd5bf5f60fba7169c6e35ea44 (patch) | |
| tree | 5ada284a07669b925acd8da41c0ace2156107d32 /test/random.unit.js | |
| parent | a0465fcd7678812cfe697c3dd045085d94e52cfa (diff) | |
| download | faker-40c13f210afd9a2cd5bf5f60fba7169c6e35ea44.tar.xz faker-40c13f210afd9a2cd5bf5f60fba7169c6e35ea44.zip | |
Implemented faker.seed method for randomization seeding
Diffstat (limited to 'test/random.unit.js')
| -rw-r--r-- | test/random.unit.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/random.unit.js b/test/random.unit.js index 201c2267..8f047ee5 100644 --- a/test/random.unit.js +++ b/test/random.unit.js @@ -65,10 +65,16 @@ describe("random.js", function () { }; faker.random.number(opts); - + assert.equal(opts.min, min); assert.equal(opts.max, max); }); + + it('should return deterministic results when seeded', function() { + faker.seed(100); + var name = faker.name.findName(); + assert.equal(name, 'Dulce Jenkins'); + }) }); describe('arrayElement', function() { |
