Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b763a31

Browse filesBrowse files
Trottaddaleax
authored andcommitted
test: refactor test-child-process-exec-error
* assert.equal() -> assert.strictEqual() * regex -> .include() * Change variable representing a function from `fun` to idiomatic `fn` * var -> const PR-URL: #9780 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
1 parent 9554a97 commit b763a31
Copy full SHA for b763a31

File tree

Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-child-process-exec-error.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-exec-error.js
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
'use strict';
2-
var common = require('../common');
3-
var assert = require('assert');
4-
var child_process = require('child_process');
2+
const common = require('../common');
3+
const assert = require('assert');
4+
const child_process = require('child_process');
55

6-
function test(fun, code) {
7-
fun('does-not-exist', common.mustCall(function(err) {
8-
assert.equal(err.code, code);
9-
assert(/does\-not\-exist/.test(err.cmd));
6+
function test(fn, code) {
7+
fn('does-not-exist', common.mustCall(function(err) {
8+
assert.strictEqual(err.code, code);
9+
assert(err.cmd.includes('does-not-exist'));
1010
}));
1111
}
1212

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.