| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 67c5f74 commit 0052c40
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -473,8 +473,8 @@ function unrefdHandle() { | |||
| 473 | 473 | ||
| 474 | 474 | // Make sure we clean up if the callback is no longer a function | |
| 475 | 475 | // even if the timer is an interval. | |
| 476 | - if (!this.owner._repeat | ||
| 477 | - || typeof this.owner._onTimeout !== 'function') { | ||
| 476 | + if (!this.owner._repeat || | ||
| 477 | + typeof this.owner._onTimeout !== 'function') { | ||
| 478 | 478 | this.owner.close(); | |
| 479 | 479 | } | |
| 480 | 480 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,27 +32,27 @@ const fixtureD = fixture('define-global.js'); | |||
| 32 | 32 | const fixtureThrows = fixture('throws_error4.js'); | |
| 33 | 33 | ||
| 34 | 34 | // test preloading a single module works | |
| 35 | - childProcess.exec(nodeBinary + ' ' | ||
| 36 | - + preloadOption([fixtureA]) + ' ' | ||
| 37 | - + fixtureB, | ||
| 35 | + childProcess.exec(nodeBinary + ' ' + | ||
| 36 | + preloadOption([fixtureA]) + ' ' + | ||
| 37 | + fixtureB, | ||
| 38 | 38 | function(err, stdout, stderr) { | |
| 39 | 39 | if (err) throw err; | |
| 40 | 40 | assert.strictEqual(stdout, 'A\nB\n'); | |
| 41 | 41 | }); | |
| 42 | 42 | ||
| 43 | 43 | // test preloading multiple modules works | |
| 44 | - childProcess.exec(nodeBinary + ' ' | ||
| 45 | - + preloadOption([fixtureA, fixtureB]) + ' ' | ||
| 46 | - + fixtureC, | ||
| 44 | + childProcess.exec(nodeBinary + ' ' + | ||
| 45 | + preloadOption([fixtureA, fixtureB]) + ' ' + | ||
| 46 | + fixtureC, | ||
| 47 | 47 | function(err, stdout, stderr) { | |
| 48 | 48 | if (err) throw err; | |
| 49 | 49 | assert.strictEqual(stdout, 'A\nB\nC\n'); | |
| 50 | 50 | }); | |
| 51 | 51 | ||
| 52 | 52 | // test that preloading a throwing module aborts | |
| 53 | - childProcess.exec(nodeBinary + ' ' | ||
| 54 | - + preloadOption([fixtureA, fixtureThrows]) + ' ' | ||
| 55 | - + fixtureB, | ||
| 53 | + childProcess.exec(nodeBinary + ' ' + | ||
| 54 | + preloadOption([fixtureA, fixtureThrows]) + ' ' + | ||
| 55 | + fixtureB, | ||
| 56 | 56 | function(err, stdout, stderr) { | |
| 57 | 57 | if (err) { | |
| 58 | 58 | assert.strictEqual(stdout, 'A\n'); | |
@@ -62,9 +62,9 @@ childProcess.exec(nodeBinary + ' ' | |||
| 62 | 62 | }); | |
| 63 | 63 | ||
| 64 | 64 | // test that preload can be used with --eval | |
| 65 | - childProcess.exec(nodeBinary + ' ' | ||
| 66 | - + preloadOption([fixtureA]) | ||
| 67 | - + '-e "console.log(\'hello\');"', | ||
| 65 | + childProcess.exec(nodeBinary + ' ' + | ||
| 66 | + preloadOption([fixtureA]) + | ||
| 67 | + '-e "console.log(\'hello\');"', | ||
| 68 | 68 | function(err, stdout, stderr) { | |
| 69 | 69 | if (err) throw err; | |
| 70 | 70 | assert.strictEqual(stdout, 'A\nhello\n'); | |
@@ -108,19 +108,19 @@ replProc.on('close', function(code) { | |||
| 108 | 108 | ||
| 109 | 109 | // test that preload placement at other points in the cmdline | |
| 110 | 110 | // also test that duplicated preload only gets loaded once | |
| 111 | - childProcess.exec(nodeBinary + ' ' | ||
| 112 | - + preloadOption([fixtureA]) | ||
| 113 | - + '-e "console.log(\'hello\');" ' | ||
| 114 | - + preloadOption([fixtureA, fixtureB]), | ||
| 111 | + childProcess.exec(nodeBinary + ' ' + | ||
| 112 | + preloadOption([fixtureA]) + | ||
| 113 | + '-e "console.log(\'hello\');" ' + | ||
| 114 | + preloadOption([fixtureA, fixtureB]), | ||
| 115 | 115 | function(err, stdout, stderr) { | |
| 116 | 116 | if (err) throw err; | |
| 117 | 117 | assert.strictEqual(stdout, 'A\nB\nhello\n'); | |
| 118 | 118 | }); | |
| 119 | 119 | ||
| 120 | 120 | // test that preload works with -i | |
| 121 | - const interactive = childProcess.exec(nodeBinary + ' ' | ||
| 122 | - + preloadOption([fixtureD]) | ||
| 123 | - + '-i', | ||
| 121 | + const interactive = childProcess.exec(nodeBinary + ' ' + | ||
| 122 | + preloadOption([fixtureD]) + | ||
| 123 | + '-i', | ||
| 124 | 124 | common.mustCall(function(err, stdout, stderr) { | |
| 125 | 125 | assert.ifError(err); | |
| 126 | 126 | assert.strictEqual(stdout, "> 'test'\n> "); | |
@@ -129,20 +129,20 @@ const interactive = childProcess.exec(nodeBinary + ' ' | |||
| 129 | 129 | interactive.stdin.write('a\n'); | |
| 130 | 130 | interactive.stdin.write('process.exit()\n'); | |
| 131 | 131 | ||
| 132 | - childProcess.exec(nodeBinary + ' ' | ||
| 133 | - + '--require ' + fixture('cluster-preload.js') + ' ' | ||
| 134 | - + fixture('cluster-preload-test.js'), | ||
| 132 | + childProcess.exec(nodeBinary + ' ' + | ||
| 133 | + '--require ' + fixture('cluster-preload.js') + ' ' + | ||
| 134 | + fixture('cluster-preload-test.js'), | ||
| 135 | 135 | function(err, stdout, stderr) { | |
| 136 | 136 | if (err) throw err; | |
| 137 | 137 | assert.ok(/worker terminated with code 43/.test(stdout)); | |
| 138 | 138 | }); | |
| 139 | 139 | ||
| 140 | 140 | // https://github.com/nodejs/node/issues/1691 | |
| 141 | 141 | process.chdir(common.fixturesDir); | |
| 142 | - childProcess.exec(nodeBinary + ' ' | ||
| 143 | - + '--expose_debug_as=v8debug ' | ||
| 144 | - + '--require ' + fixture('cluster-preload.js') + ' ' | ||
| 145 | - + 'cluster-preload-test.js', | ||
| 142 | + childProcess.exec(nodeBinary + ' ' + | ||
| 143 | + '--expose_debug_as=v8debug ' + | ||
| 144 | + '--require ' + fixture('cluster-preload.js') + ' ' + | ||
| 145 | + 'cluster-preload-test.js', | ||
| 146 | 146 | function(err, stdout, stderr) { | |
| 147 | 147 | if (err) throw err; | |
| 148 | 148 | assert.ok(/worker terminated with code 43/.test(stdout)); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,6 +18,6 @@ putIn.write = function(data) { | |||
| 18 | 18 | }; | |
| 19 | 19 | ||
| 20 | 20 | putIn.run([ | |
| 21 | - 'require("domain").create().on("error", function() { console.log("OK") })' | ||
| 22 | - + '.run(function() { throw new Error("threw") })' | ||
| 21 | + 'require("domain").create().on("error", function() { console.log("OK") })' + | ||
| 22 | + '.run(function() { throw new Error("threw") })' | ||
| 23 | 23 | ]); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -53,8 +53,8 @@ function test(size, err, next) { | |||
| 53 | 53 | if (err) { | |
| 54 | 54 | client.on('error', function(e) { | |
| 55 | 55 | nerror++; | |
| 56 | - assert.strictEqual(e.message, 'DH parameter size 1024 is less' | ||
| 57 | - + ' than 2048'); | ||
| 56 | + assert.strictEqual(e.message, 'DH parameter size 1024 is less' + | ||
| 57 | + ' than 2048'); | ||
| 58 | 58 | server.close(); | |
| 59 | 59 | }); | |
| 60 | 60 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments