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 8d583a7

Browse filesBrowse files
chrisbautistaMylesBorins
authored andcommitted
test: switch strictEqual parameters - actual first before expected
PR-URL: #23537 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent a410488 commit 8d583a7
Copy full SHA for 8d583a7

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/pummel/test-exec.js‎

Copy file name to clipboardExpand all lines: test/pummel/test-exec.js
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ exec(
4747
console.log(`error!: ${err.code}`);
4848
console.log(`stdout: ${JSON.stringify(stdout)}`);
4949
console.log(`stderr: ${JSON.stringify(stderr)}`);
50-
assert.strictEqual(false, err.killed);
50+
assert.strictEqual(err.killed, false);
5151
} else {
5252
success_count++;
5353
console.dir(stdout);
@@ -59,11 +59,11 @@ exec(
5959
exec('thisisnotavalidcommand', function(err, stdout, stderr) {
6060
if (err) {
6161
error_count++;
62-
assert.strictEqual('', stdout);
62+
assert.strictEqual(stdout, '');
6363
assert.strictEqual(typeof err.code, 'number');
6464
assert.notStrictEqual(err.code, 0);
65-
assert.strictEqual(false, err.killed);
66-
assert.strictEqual(null, err.signal);
65+
assert.strictEqual(err.killed, false);
66+
assert.strictEqual(err.signal, null);
6767
console.log(`error code: ${err.code}`);
6868
console.log(`stdout: ${JSON.stringify(stdout)}`);
6969
console.log(`stderr: ${JSON.stringify(stderr)}`);
@@ -97,7 +97,7 @@ process.nextTick(function() {
9797
console.log(`kill pid ${killMeTwice.pid}`);
9898
// make sure there is no race condition in starting the process
9999
// the PID SHOULD exist directly following the exec() call.
100-
assert.strictEqual('number', typeof killMeTwice._handle.pid);
100+
assert.strictEqual(typeof killMeTwice._handle.pid, 'number');
101101
// Kill the process
102102
killMeTwice.kill();
103103
});
@@ -128,6 +128,6 @@ exec('python -c "print 200000*\'C\'"', { maxBuffer: 1000 },
128128

129129

130130
process.on('exit', function() {
131-
assert.strictEqual(1, success_count);
132-
assert.strictEqual(1, error_count);
131+
assert.strictEqual(success_count, 1);
132+
assert.strictEqual(error_count, 1);
133133
});

0 commit comments

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