diff options
| author | Marak <[email protected]> | 2015-07-21 01:03:08 -0700 |
|---|---|---|
| committer | Marak <[email protected]> | 2015-07-21 01:03:08 -0700 |
| commit | 98bb87a82c95c9a982905983166fc9fdaff1d6a4 (patch) | |
| tree | b61bf88e1129c66a512138ff4e02b42d8086a4c0 /test/random.unit.js | |
| parent | 35da03d4e7e6f535471ee471afb1d98f9c075f8d (diff) | |
| parent | 76e3fa5949412ea475de6bba55d6c1194f84540c (diff) | |
| download | faker-98bb87a82c95c9a982905983166fc9fdaff1d6a4.tar.xz faker-98bb87a82c95c9a982905983166fc9fdaff1d6a4.zip | |
Merge pull request #243 from Aweary/random-seed
[api] Implement faker.seed for deterministic output
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() { |
