From 2a938bd11b781f61718e2ddfb8a6419002d9e757 Mon Sep 17 00:00:00 2001 From: Carlos Carvalho Date: Sun, 4 Oct 2020 02:05:11 -0300 Subject: Change deprecated assert.equal --- test/database.unit.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test/database.unit.js') diff --git a/test/database.unit.js b/test/database.unit.js index bb0cd2a5..57e12325 100644 --- a/test/database.unit.js +++ b/test/database.unit.js @@ -9,8 +9,9 @@ describe("database.js", function () { it("returns a column name", function () { sinon.stub(faker.database, 'column').returns('title'); var column = faker.database.column(); + var expected = 'title'; - assert.equal(column, 'title'); + assert.strictEqual(column, expected, "The column name should be equals " + expected + ". Actual is " + column); faker.database.column.restore(); }); }); @@ -19,8 +20,9 @@ describe("database.js", function () { it("returns a collation", function () { sinon.stub(faker.database, 'collation').returns('utf8_bin'); var collation = faker.database.collation(); + var expected = 'utf8_bin'; - assert.equal(collation, 'utf8_bin'); + assert.strictEqual(collation, expected, "The collation should be equals " + expected + ". Actual is " + collation); faker.database.collation.restore(); }); }); @@ -29,8 +31,9 @@ describe("database.js", function () { it("returns an engine", function () { sinon.stub(faker.database, 'engine').returns('InnoDB'); var engine = faker.database.engine(); + var expected = 'InnoDB'; - assert.equal(engine, 'InnoDB'); + assert.strictEqual(engine, expected, "The db engine should be equals " + expected + ". Actual is " + engine); faker.database.engine.restore(); }); }); @@ -39,8 +42,9 @@ describe("database.js", function () { it("returns a column type", function () { sinon.stub(faker.database, 'type').returns('int'); var type = faker.database.type(); + var expected = 'int'; - assert.equal(type, 'int'); + assert.strictEqual(type, expected, "The column type should be equals " + expected + ". Actual is " + type); faker.database.type.restore(); }); }); -- cgit v1.2.3 From 6c39b4ae15cb6ca9271ba4740e43dd521732e8f4 Mon Sep 17 00:00:00 2001 From: Carlos Carvalho Date: Sun, 4 Oct 2020 02:23:19 -0300 Subject: Fix typo --- test/database.unit.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/database.unit.js') diff --git a/test/database.unit.js b/test/database.unit.js index 57e12325..b3955fea 100644 --- a/test/database.unit.js +++ b/test/database.unit.js @@ -11,7 +11,7 @@ describe("database.js", function () { var column = faker.database.column(); var expected = 'title'; - assert.strictEqual(column, expected, "The column name should be equals " + expected + ". Actual is " + column); + assert.strictEqual(column, expected, "The column name should be equals " + expected + ". Current is " + column); faker.database.column.restore(); }); }); @@ -22,7 +22,7 @@ describe("database.js", function () { var collation = faker.database.collation(); var expected = 'utf8_bin'; - assert.strictEqual(collation, expected, "The collation should be equals " + expected + ". Actual is " + collation); + assert.strictEqual(collation, expected, "The collation should be equals " + expected + ". Current is " + collation); faker.database.collation.restore(); }); }); @@ -33,7 +33,7 @@ describe("database.js", function () { var engine = faker.database.engine(); var expected = 'InnoDB'; - assert.strictEqual(engine, expected, "The db engine should be equals " + expected + ". Actual is " + engine); + assert.strictEqual(engine, expected, "The db engine should be equals " + expected + ". Current is " + engine); faker.database.engine.restore(); }); }); @@ -44,7 +44,7 @@ describe("database.js", function () { var type = faker.database.type(); var expected = 'int'; - assert.strictEqual(type, expected, "The column type should be equals " + expected + ". Actual is " + type); + assert.strictEqual(type, expected, "The column type should be equals " + expected + ". Current is " + type); faker.database.type.restore(); }); }); -- cgit v1.2.3