| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 44174a5 commit 5013022
29 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,5 +33,5 @@ fs.writeFileSync(addonDestinationPath, contents); | |||
| 33 | 33 | ||
| 34 | 34 | // Attempt to load at long path destination | |
| 35 | 35 | const addon = require(addonDestinationPath); | |
| 36 | - assert.notEqual(addon, null); | ||
| 36 | + assert.notStrictEqual(addon, null); | ||
| 37 | 37 | assert.strictEqual(addon.hello(), 'world'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,12 +6,12 @@ const assert = require('assert'); | |||
| 6 | 6 | var oldgid = process.getgid(); | |
| 7 | 7 | process.setgid('nobody'); | |
| 8 | 8 | var newgid = process.getgid(); | |
| 9 | - assert.notEqual(newgid, oldgid, 'gids expected to be different'); | ||
| 9 | + assert.notStrictEqual(newgid, oldgid, 'gids expected to be different'); | ||
| 10 | 10 | ||
| 11 | 11 | var olduid = process.getuid(); | |
| 12 | 12 | process.setuid('nobody'); | |
| 13 | 13 | var newuid = process.getuid(); | |
| 14 | - assert.notEqual(newuid, olduid, 'uids expected to be different'); | ||
| 14 | + assert.notStrictEqual(newuid, olduid, 'uids expected to be different'); | ||
| 15 | 15 | ||
| 16 | 16 | try { | |
| 17 | 17 | process.setuid('nobody1234'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -96,7 +96,7 @@ testData.forEach((item) => { | |||
| 96 | 96 | const actual = output.replace(/\s/g, ''); | |
| 97 | 97 | // Assert that the input stripped of all whitespace contains the | |
| 98 | 98 | // expected list | |
| 99 | - assert.notEqual(actual.indexOf(expected), -1); | ||
| 99 | + assert.notStrictEqual(actual.indexOf(expected), -1); | ||
| 100 | 100 | })); | |
| 101 | 101 | })); | |
| 102 | 102 | })); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | 1 | const assert = require('assert'); | |
| 2 | - assert.notEqual(module, require.main, 'require.main should not == module'); | ||
| 3 | - assert.notEqual(module, process.mainModule, | ||
| 4 | - 'process.mainModule should not === module'); | ||
| 2 | + assert.notStrictEqual(module, require.main, 'require.main should not == module'); | ||
| 3 | + assert.notStrictEqual(module, process.mainModule, | ||
| 4 | + 'process.mainModule should not === module'); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ const cp = require('child_process'); | |||
| 6 | 6 | // Verify that a shell is, in fact, executed | |
| 7 | 7 | const doesNotExist = cp.spawn('does-not-exist', {shell: true}); | |
| 8 | 8 | ||
| 9 | - assert.notEqual(doesNotExist.spawnfile, 'does-not-exist'); | ||
| 9 | + assert.notStrictEqual(doesNotExist.spawnfile, 'does-not-exist'); | ||
| 10 | 10 | doesNotExist.on('error', common.fail); | |
| 11 | 11 | doesNotExist.on('exit', common.mustCall((code, signal) => { | |
| 12 | 12 | assert.strictEqual(signal, null); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ const cp = require('child_process'); | |||
| 6 | 6 | // Verify that a shell is, in fact, executed | |
| 7 | 7 | const doesNotExist = cp.spawnSync('does-not-exist', {shell: true}); | |
| 8 | 8 | ||
| 9 | - assert.notEqual(doesNotExist.file, 'does-not-exist'); | ||
| 9 | + assert.notStrictEqual(doesNotExist.file, 'does-not-exist'); | ||
| 10 | 10 | assert.strictEqual(doesNotExist.error, undefined); | |
| 11 | 11 | assert.strictEqual(doesNotExist.signal, null); | |
| 12 | 12 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -115,7 +115,7 @@ assert.strictEqual("{ foo: 'bar', inspect: [Function: inspect] }\n", | |||
| 115 | 115 | strings.shift()); | |
| 116 | 116 | assert.strictEqual("{ foo: 'bar', inspect: [Function: inspect] }\n", | |
| 117 | 117 | strings.shift()); | |
| 118 | - assert.notEqual(-1, strings.shift().indexOf('foo: [Object]')); | ||
| 118 | + assert.ok(strings.shift().includes('foo: [Object]')); | ||
| 119 | 119 | assert.strictEqual(-1, strings.shift().indexOf('baz')); | |
| 120 | 120 | assert.ok(/^label: \d+\.\d{3}ms$/.test(strings.shift().trim())); | |
| 121 | 121 | assert.ok(/^__proto__: \d+\.\d{3}ms$/.test(strings.shift().trim())); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -47,10 +47,10 @@ function testHelper(stream, args, expectedOutput, cmd, env) { | |||
| 47 | 47 | ||
| 48 | 48 | function responseHandler(buffer, expectedOutput) { | |
| 49 | 49 | const response = buffer.toString(); | |
| 50 | - assert.notEqual(0, response.length); | ||
| 50 | + assert.notStrictEqual(response.length, 0); | ||
| 51 | 51 | if (FIPS_ENABLED !== expectedOutput && FIPS_DISABLED !== expectedOutput) { | |
| 52 | 52 | // In the case of expected errors just look for a substring. | |
| 53 | - assert.notEqual(-1, response.indexOf(expectedOutput)); | ||
| 53 | + assert.ok(response.includes(expectedOutput)); | ||
| 54 | 54 | } else { | |
| 55 | 55 | // Normal path where we expect either FIPS enabled or disabled. | |
| 56 | 56 | assert.strictEqual(expectedOutput, Number(response)); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -67,8 +67,8 @@ assert.deepStrictEqual( | |||
| 67 | 67 | // stream interface should produce the same result. | |
| 68 | 68 | assert.deepStrictEqual(a5, a3, 'stream interface is consistent'); | |
| 69 | 69 | assert.deepStrictEqual(a6, a3, 'stream interface is consistent'); | |
| 70 | - assert.notEqual(a7, undefined, 'no data should return data'); | ||
| 71 | - assert.notEqual(a8, undefined, 'empty string should generate data'); | ||
| 70 | + assert.notStrictEqual(a7, undefined, 'no data should return data'); | ||
| 71 | + assert.notStrictEqual(a8, undefined, 'empty string should generate data'); | ||
| 72 | 72 | ||
| 73 | 73 | // Test multiple updates to same hash | |
| 74 | 74 | var h1 = crypto.createHash('sha1').update('Test123').digest('hex'); | |
@@ -100,7 +100,7 @@ assert.strictEqual( | |||
| 100 | 100 | '4b21bbd1a68e690a730ddcb5a8bc94ead9879ffe82580767ad7ec6fa8ba2dea6' + | |
| 101 | 101 | '43a821af66afa9a45b6a78c712fecf0e56dc7f43aef4bcfc8eb5b4d8dca6ea5b'); | |
| 102 | 102 | ||
| 103 | - assert.notEqual( | ||
| 103 | + assert.notStrictEqual( | ||
| 104 | 104 | hutf8, | |
| 105 | 105 | crypto.createHash('sha512').update('УТФ-8 text', 'latin1').digest('hex')); | |
| 106 | 106 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -72,9 +72,9 @@ function runTestWithAbortOnUncaughtException() { | |||
| 72 | 72 | child_process.exec(createTestCmdLine({ | |
| 73 | 73 | withAbortOnUncaughtException: true | |
| 74 | 74 | }), function onTestDone(err, stdout, stderr) { | |
| 75 | - assert.notEqual(err.code, RAN_UNCAUGHT_EXCEPTION_HANDLER_EXIT_CODE, | ||
| 76 | - 'child process should not have run its uncaughtException ' + | ||
| 77 | - 'event handler'); | ||
| 75 | + assert.notStrictEqual(err.code, RAN_UNCAUGHT_EXCEPTION_HANDLER_EXIT_CODE, | ||
| 76 | + 'child process should not have run its ' + | ||
| 77 | + 'uncaughtException event handler'); | ||
| 78 | 78 | assert(common.nodeProcessAborted(err.code, err.signal), | |
| 79 | 79 | 'process should have aborted, but did not'); | |
| 80 | 80 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments