| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cffd51e commit ad27555
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,15 +19,15 @@ var filename = __filename.replace(/\\/g, '/'); | |||
| 19 | 19 | // assert that nothing is written to stdout | |
| 20 | 20 | child.exec(nodejs + ' --eval 42', | |
| 21 | 21 | function(err, stdout, stderr) { | |
| 22 | - assert.equal(stdout, ''); | ||
| 23 | - assert.equal(stderr, ''); | ||
| 22 | + assert.strictEqual(stdout, ''); | ||
| 23 | + assert.strictEqual(stderr, ''); | ||
| 24 | 24 | }); | |
| 25 | 25 | ||
| 26 | 26 | // assert that "42\n" is written to stderr | |
| 27 | 27 | child.exec(nodejs + ' --eval "console.error(42)"', | |
| 28 | 28 | function(err, stdout, stderr) { | |
| 29 | - assert.equal(stdout, ''); | ||
| 30 | - assert.equal(stderr, '42\n'); | ||
| 29 | + assert.strictEqual(stdout, ''); | ||
| 30 | + assert.strictEqual(stderr, '42\n'); | ||
| 31 | 31 | }); | |
| 32 | 32 | ||
| 33 | 33 | // assert that the expected output is written to stdout | |
@@ -36,27 +36,27 @@ child.exec(nodejs + ' --eval "console.error(42)"', | |||
| 36 | 36 | ||
| 37 | 37 | child.exec(cmd + '42', | |
| 38 | 38 | function(err, stdout, stderr) { | |
| 39 | - assert.equal(stdout, '42\n'); | ||
| 40 | - assert.equal(stderr, ''); | ||
| 39 | + assert.strictEqual(stdout, '42\n'); | ||
| 40 | + assert.strictEqual(stderr, ''); | ||
| 41 | 41 | }); | |
| 42 | 42 | ||
| 43 | 43 | child.exec(cmd + "'[]'", common.mustCall( | |
| 44 | 44 | function(err, stdout, stderr) { | |
| 45 | - assert.equal(stdout, '[]\n'); | ||
| 46 | - assert.equal(stderr, ''); | ||
| 45 | + assert.strictEqual(stdout, '[]\n'); | ||
| 46 | + assert.strictEqual(stderr, ''); | ||
| 47 | 47 | })); | |
| 48 | 48 | }); | |
| 49 | 49 | ||
| 50 | 50 | // assert that module loading works | |
| 51 | 51 | child.exec(nodejs + ' --eval "require(\'' + filename + '\')"', | |
| 52 | 52 | function(status, stdout, stderr) { | |
| 53 | - assert.equal(status.code, 42); | ||
| 53 | + assert.strictEqual(status.code, 42); | ||
| 54 | 54 | }); | |
| 55 | 55 | ||
| 56 | 56 | // module path resolve bug, regression test | |
| 57 | 57 | child.exec(nodejs + ' --eval "require(\'./test/parallel/test-cli-eval.js\')"', | |
| 58 | 58 | function(status, stdout, stderr) { | |
| 59 | - assert.equal(status.code, 42); | ||
| 59 | + assert.strictEqual(status.code, 42); | ||
| 60 | 60 | }); | |
| 61 | 61 | ||
| 62 | 62 | // Missing argument should not crash | |
@@ -67,26 +67,27 @@ child.exec(nodejs + ' -e', common.mustCall(function(status, stdout, stderr) { | |||
| 67 | 67 | ||
| 68 | 68 | // empty program should do nothing | |
| 69 | 69 | child.exec(nodejs + ' -e ""', function(status, stdout, stderr) { | |
| 70 | - assert.equal(stdout, ''); | ||
| 71 | - assert.equal(stderr, ''); | ||
| 70 | + assert.strictEqual(stdout, ''); | ||
| 71 | + assert.strictEqual(stderr, ''); | ||
| 72 | 72 | }); | |
| 73 | 73 | ||
| 74 | 74 | // "\\-42" should be interpreted as an escaped expression, not a switch | |
| 75 | 75 | child.exec(nodejs + ' -p "\\-42"', | |
| 76 | 76 | function(err, stdout, stderr) { | |
| 77 | - assert.equal(stdout, '-42\n'); | ||
| 78 | - assert.equal(stderr, ''); | ||
| 77 | + assert.strictEqual(stdout, '-42\n'); | ||
| 78 | + assert.strictEqual(stderr, ''); | ||
| 79 | 79 | }); | |
| 80 | 80 | ||
| 81 | 81 | child.exec(nodejs + ' --use-strict -p process.execArgv', | |
| 82 | 82 | function(status, stdout, stderr) { | |
| 83 | - assert.equal(stdout, "[ '--use-strict', '-p', 'process.execArgv' ]\n"); | ||
| 83 | + assert.strictEqual(stdout, | ||
| 84 | + "[ '--use-strict', '-p', 'process.execArgv' ]\n"); | ||
| 84 | 85 | }); | |
| 85 | 86 | ||
| 86 | 87 | // Regression test for https://github.com/nodejs/node/issues/3574 | |
| 87 | 88 | const emptyFile = path.join(common.fixturesDir, 'empty.js'); | |
| 88 | 89 | child.exec(nodejs + ` -e 'require("child_process").fork("${emptyFile}")'`, | |
| 89 | 90 | function(status, stdout, stderr) { | |
| 90 | - assert.equal(stdout, ''); | ||
| 91 | - assert.equal(stderr, ''); | ||
| 91 | + assert.strictEqual(stdout, ''); | ||
| 92 | + assert.strictEqual(stderr, ''); | ||
| 92 | 93 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments