mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 11:04:30 +00:00

In preparation for a lint rule that will enforce assert.deepStrictEqual() over assert.deepEqual(), change tests and benchmarks accordingly. For tests and benchmarks that are testing or benchmarking assert.deepEqual() itself, apply a comment to ignore the upcoming rule. PR-URL: https://github.com/nodejs/node/pull/6213 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
27 lines
725 B
JavaScript
27 lines
725 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const tls = require('tls');
|
|
|
|
const singles = 'C=US\nST=CA\nL=SF\nO=Node.js Foundation\nOU=Node.js\n' +
|
|
'CN=ca1\nemailAddress=ry@clouds.org';
|
|
const singlesOut = tls.parseCertString(singles);
|
|
assert.deepStrictEqual(singlesOut, {
|
|
C: 'US',
|
|
ST: 'CA',
|
|
L: 'SF',
|
|
O: 'Node.js Foundation',
|
|
OU: 'Node.js',
|
|
CN: 'ca1',
|
|
emailAddress: 'ry@clouds.org'
|
|
});
|
|
|
|
const doubles = 'OU=Domain Control Validated\nOU=PositiveSSL Wildcard\n' +
|
|
'CN=*.nodejs.org';
|
|
const doublesOut = tls.parseCertString(doubles);
|
|
assert.deepStrictEqual(doublesOut, {
|
|
OU: [ 'Domain Control Validated', 'PositiveSSL Wildcard' ],
|
|
CN: '*.nodejs.org'
|
|
});
|