diff options
author | gwer <webholt@gmail.com> | 2017-04-23 02:01:54 +0300 |
---|---|---|
committer | Alexey Orlenko <eaglexrlnk@gmail.com> | 2017-04-30 04:08:46 +0300 |
commit | 01422769775a2ce7dfef8aa6dbda2d326f002e13 (patch) | |
tree | e3255f3dc9fd66fd3fb2a09c1fd4d39c2d81400f /test/parallel/test-child-process-spawnsync-input.js | |
parent | 0324ac686ce1c8ffc5a81e6a8290b6c5c7fd04fd (diff) | |
download | android-node-v8-01422769775a2ce7dfef8aa6dbda2d326f002e13.tar.gz android-node-v8-01422769775a2ce7dfef8aa6dbda2d326f002e13.tar.bz2 android-node-v8-01422769775a2ce7dfef8aa6dbda2d326f002e13.zip |
test: replace indexOf with includes
Start the transition to Array.prototype.includes() and
String.prototype.includes(). This commit refactors most of the
comparisons of Array.prototype.indexOf() and String.prototype.indexOf()
return values with -1 to the former methods in tests.
PR-URL: https://github.com/nodejs/node/pull/12604
Refs: https://github.com/nodejs/node/issues/12586
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'test/parallel/test-child-process-spawnsync-input.js')
-rw-r--r-- | test/parallel/test-child-process-spawnsync-input.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-child-process-spawnsync-input.js b/test/parallel/test-child-process-spawnsync-input.js index c1f9ef149d..5b9f418cf7 100644 --- a/test/parallel/test-child-process-spawnsync-input.js +++ b/test/parallel/test-child-process-spawnsync-input.js @@ -52,7 +52,7 @@ function verifyBufOutput(ret) { assert.deepStrictEqual(ret.stderr, msgErrBuf); } -if (process.argv.indexOf('spawnchild') !== -1) { +if (process.argv.includes('spawnchild')) { switch (process.argv[3]) { case '1': ret = spawnSync(process.execPath, args, { stdio: 'inherit' }); |