From 9d1ee0992dbe44362ff5f148201ec513beec80fa Mon Sep 17 00:00:00 2001 From: Josh Mays Date: Thu, 1 Dec 2016 10:09:05 -0600 Subject: [PATCH 1/2] test: replace equal with strictEqual Replace assert.equal with assert.strictEqual --- test/parallel/test-crypto-certificate.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-crypto-certificate.js b/test/parallel/test-crypto-certificate.js index 66a5da04073825..1dfb2c73b0eca5 100644 --- a/test/parallel/test-crypto-certificate.js +++ b/test/parallel/test-crypto-certificate.js @@ -19,20 +19,20 @@ var spkacPem = fs.readFileSync(common.fixturesDir + '/spkac.pem'); var certificate = new crypto.Certificate(); -assert.equal(certificate.verifySpkac(spkacValid), true); -assert.equal(certificate.verifySpkac(spkacFail), false); +assert.strictEqual(certificate.verifySpkac(spkacValid), true); +assert.strictEqual(certificate.verifySpkac(spkacFail), false); -assert.equal( +assert.strictEqual( stripLineEndings(certificate.exportPublicKey(spkacValid).toString('utf8')), stripLineEndings(spkacPem.toString('utf8')) ); -assert.equal(certificate.exportPublicKey(spkacFail), ''); +assert.strictEqual(certificate.exportPublicKey(spkacFail), ''); -assert.equal( +assert.strictEqual( certificate.exportChallenge(spkacValid).toString('utf8'), 'fb9ab814-6677-42a4-a60c-f905d1a6924d' ); -assert.equal(certificate.exportChallenge(spkacFail), ''); +assert.strictEqual(certificate.exportChallenge(spkacFail), ''); function stripLineEndings(obj) { return obj.replace(/\n/g, ''); From 045418de6b6a6f714e917b350812a37a2a45f04d Mon Sep 17 00:00:00 2001 From: Josh Mays Date: Thu, 1 Dec 2016 10:09:05 -0600 Subject: [PATCH 2/2] test: refactor test-crypto-certificate Replace assert.equal with assert.strictEqual --- test/parallel/test-crypto-certificate.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-crypto-certificate.js b/test/parallel/test-crypto-certificate.js index 66a5da04073825..1dfb2c73b0eca5 100644 --- a/test/parallel/test-crypto-certificate.js +++ b/test/parallel/test-crypto-certificate.js @@ -19,20 +19,20 @@ var spkacPem = fs.readFileSync(common.fixturesDir + '/spkac.pem'); var certificate = new crypto.Certificate(); -assert.equal(certificate.verifySpkac(spkacValid), true); -assert.equal(certificate.verifySpkac(spkacFail), false); +assert.strictEqual(certificate.verifySpkac(spkacValid), true); +assert.strictEqual(certificate.verifySpkac(spkacFail), false); -assert.equal( +assert.strictEqual( stripLineEndings(certificate.exportPublicKey(spkacValid).toString('utf8')), stripLineEndings(spkacPem.toString('utf8')) ); -assert.equal(certificate.exportPublicKey(spkacFail), ''); +assert.strictEqual(certificate.exportPublicKey(spkacFail), ''); -assert.equal( +assert.strictEqual( certificate.exportChallenge(spkacValid).toString('utf8'), 'fb9ab814-6677-42a4-a60c-f905d1a6924d' ); -assert.equal(certificate.exportChallenge(spkacFail), ''); +assert.strictEqual(certificate.exportChallenge(spkacFail), ''); function stripLineEndings(obj) { return obj.replace(/\n/g, '');