Skip to content

Commit

Permalink
test: refactor test-crypto-certificate
Browse files Browse the repository at this point in the history
assert.equal() -> assert.strictEqual()

PR-URL: #9911
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
Josh Mays authored and Fishrock123 committed Dec 5, 2016
1 parent 278772a commit bca587b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/parallel/test-crypto-certificate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, '');
Expand Down

0 comments on commit bca587b

Please sign in to comment.