aboutsummaryrefslogtreecommitdiff
path: root/test/lorem.unit.js
diff options
context:
space:
mode:
authorCarlos Carvalho <[email protected]>2020-10-04 02:05:11 -0300
committerCarlos Carvalho <[email protected]>2020-10-04 02:05:11 -0300
commit2a938bd11b781f61718e2ddfb8a6419002d9e757 (patch)
treed92c13067ee09c7e9e9cf7d5d22aff3b49c9262f /test/lorem.unit.js
parent91dc8a3372426bc691be56153b33e81a16459f49 (diff)
downloadfaker-2a938bd11b781f61718e2ddfb8a6419002d9e757.tar.xz
faker-2a938bd11b781f61718e2ddfb8a6419002d9e757.zip
Change deprecated assert.equal
Diffstat (limited to 'test/lorem.unit.js')
-rw-r--r--test/lorem.unit.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/lorem.unit.js b/test/lorem.unit.js
index 04c03a55..d7853a4b 100644
--- a/test/lorem.unit.js
+++ b/test/lorem.unit.js
@@ -18,7 +18,7 @@ describe("lorem.js", function () {
it("returns a word with the requested length", function () {
var str = faker.lorem.word(5);
assert.ok(typeof str === 'string');
- assert.equal(str.length, 5);
+ assert.strictEqual(str.length, 5);
});
});
});
@@ -37,7 +37,7 @@ describe("lorem.js", function () {
var str = faker.lorem.words();
var words = str.split(' ');
assert.ok(Array.isArray(words));
- assert.equal(true, words.length >= 3);
+ assert.strictEqual(true, words.length >= 3);
// assert.ok(faker.helpers.shuffle.called);
});
});
@@ -47,7 +47,7 @@ describe("lorem.js", function () {
var str = faker.lorem.words(7);
var words = str.split(' ');
assert.ok(Array.isArray(words));
- assert.equal(words.length, 7);
+ assert.strictEqual(words.length, 7);
});
});
});
@@ -62,8 +62,8 @@ describe("lorem.js", function () {
});
var validateSlug = function (wordCount, str) {
- assert.equal(1, str.match(/^[a-z][a-z-]*[a-z]$/).length);
- assert.equal(wordCount - 1, str.match(/-/g).length);
+ assert.strictEqual(1, str.match(/^[a-z][a-z-]*[a-z]$/).length);
+ assert.strictEqual(wordCount - 1, str.match(/-/g).length);
};
context("when no 'wordCount' param passed in", function () {
@@ -91,7 +91,7 @@ describe("lorem.js", function () {
var sentence = faker.lorem.sentence();
assert.ok(typeof sentence === 'string');
var parts = sentence.split(' ');
- assert.equal(parts.length, 5); // default 3 plus stubbed 2.
+ assert.strictEqual(parts.length, 5); // default 3 plus stubbed 2.
assert.ok(faker.lorem.words.calledWith(5));
faker.lorem.words.restore();
@@ -107,7 +107,7 @@ describe("lorem.js", function () {
assert.ok(typeof sentence === 'string');
var parts = sentence.split(' ');
- assert.equal(parts.length, 12); // requested 10 plus stubbed 2.
+ assert.strictEqual(parts.length, 12); // requested 10 plus stubbed 2.
assert.ok(faker.lorem.words.calledWith(12));
faker.lorem.words.restore();
@@ -124,7 +124,7 @@ describe("lorem.js", function () {
assert.ok(typeof sentence === 'string');
var parts = sentence.split(' ');
- assert.equal(parts.length, 14); // requested 10 plus stubbed 4.
+ assert.strictEqual(parts.length, 14); // requested 10 plus stubbed 4.
assert.ok(faker.random.number.calledWith(4)); // random.number should be called with the 'range' we passed.
assert.ok(faker.lorem.words.calledWith(14));
@@ -145,7 +145,7 @@ describe("lorem.js", function () {
assert.ok(typeof sentences === 'string');
var parts = sentences.split('\n');
- assert.equal(parts.length, 3);
+ assert.strictEqual(parts.length, 3);
assert.ok(faker.lorem.sentence.calledThrice);
faker.lorem.sentence.restore();
@@ -159,7 +159,7 @@ describe("lorem.js", function () {
assert.ok(typeof sentences === 'string');
var parts = sentences.split('\n');
- assert.equal(parts.length, 5);
+ assert.strictEqual(parts.length, 5);
faker.lorem.sentence.restore();
});
@@ -176,7 +176,7 @@ describe("lorem.js", function () {
assert.ok(typeof paragraph === 'string');
var parts = paragraph.split('\n');
- assert.equal(parts.length, 5); // default 3 plus stubbed 2.
+ assert.strictEqual(parts.length, 5); // default 3 plus stubbed 2.
assert.ok(faker.lorem.sentences.calledWith(5));
faker.lorem.sentences.restore();
@@ -192,7 +192,7 @@ describe("lorem.js", function () {
assert.ok(typeof paragraph === 'string');
var parts = paragraph.split('\n');
- assert.equal(parts.length, 12); // requested 10 plus stubbed 2.
+ assert.strictEqual(parts.length, 12); // requested 10 plus stubbed 2.
assert.ok(faker.lorem.sentences.calledWith(12));
faker.lorem.sentences.restore();
@@ -212,7 +212,7 @@ describe("lorem.js", function () {
assert.ok(typeof paragraphs === 'string');
var parts = paragraphs.split('\n \r');
- assert.equal(parts.length, 3);
+ assert.strictEqual(parts.length, 3);
assert.ok(faker.lorem.paragraph.calledThrice);
faker.lorem.paragraph.restore();
@@ -226,7 +226,7 @@ describe("lorem.js", function () {
assert.ok(typeof paragraphs === 'string');
var parts = paragraphs.split('\n \r');
- assert.equal(parts.length, 5);
+ assert.strictEqual(parts.length, 5);
faker.lorem.paragraph.restore();
});