Skip to content

Commit

Permalink
Add failing test for userAgent
Browse files Browse the repository at this point in the history
Proving it is not deterministic and does not respect random seed.
  • Loading branch information
jshbrntt authored Jul 20, 2020
1 parent bfe2c99 commit 642739a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/internet.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ describe("internet.js", function () {
var ua = faker.internet.userAgent();
assert.ok(ua);
});

it('is deterministic', function () {
faker.seed(1);
var ua1 = faker.internet.userAgent();
faker.seed(1);
var ua2 = faker.internet.userAgent();
assert.equal(ua1, ua2);
});
});

describe("color()", function () {
Expand Down

0 comments on commit 642739a

Please sign in to comment.