diff options
| author | Carlos Carvalho <[email protected]> | 2020-10-04 02:05:11 -0300 |
|---|---|---|
| committer | Carlos Carvalho <[email protected]> | 2020-10-04 02:05:11 -0300 |
| commit | 2a938bd11b781f61718e2ddfb8a6419002d9e757 (patch) | |
| tree | d92c13067ee09c7e9e9cf7d5d22aff3b49c9262f /test/commerce.unit.js | |
| parent | 91dc8a3372426bc691be56153b33e81a16459f49 (diff) | |
| download | faker-2a938bd11b781f61718e2ddfb8a6419002d9e757.tar.xz faker-2a938bd11b781f61718e2ddfb8a6419002d9e757.zip | |
Change deprecated assert.equal
Diffstat (limited to 'test/commerce.unit.js')
| -rw-r--r-- | test/commerce.unit.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/commerce.unit.js b/test/commerce.unit.js index 04d4277e..61161e07 100644 --- a/test/commerce.unit.js +++ b/test/commerce.unit.js @@ -77,8 +77,8 @@ describe("commerce.js", function() { var price = faker.commerce.price(); assert.ok(price); - assert.equal((price > 0), true, "the amount should be greater than 0"); - assert.equal((price < 1001), true, "the amount should be less than 1000"); + assert.strictEqual((price > 0), true, "the amount should be greater than 0"); + assert.strictEqual((price < 1001), true, "the amount should be less than 1000"); }); it("should use the default decimal location when not passing arguments", function() { @@ -88,7 +88,7 @@ describe("commerce.js", function() { var expected = price.length - 3; var actual = price.indexOf(decimal); - assert.equal(actual, expected, "The expected location of the decimal is " + expected + " but it was " + actual + " amount " + price); + assert.strictEqual(actual, expected, "The expected location of the decimal is " + expected + " but it was " + actual + " amount " + price); }); it("should not include a currency symbol by default", function () { @@ -100,7 +100,7 @@ describe("commerce.js", function() { var expected = true; var actual = regexp.test(amount); - assert.equal(actual, expected, 'The expected match should not include a currency symbol'); + assert.strictEqual(actual, expected, 'The expected match should not include a currency symbol'); }); it("it should handle negative amounts, but return 0", function () { @@ -108,7 +108,7 @@ describe("commerce.js", function() { var amount = faker.commerce.price(-200, -1); assert.ok(amount); - assert.equal((amount == 0.00), true, "the amount should equal 0"); + assert.strictEqual((amount == 0.00), true, "the amount should equal 0"); }); it("it should handle argument dec", function () { |
