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 aba1ff2

Browse filesBrowse files
TrottBethGriggs
authored andcommitted
test: refactor test-fs-readfile-tostring-fail
The test uses both `assert()` and `assert.ok()`. Use just `assert.ok()`. Remove a comment that does not appear to match the code and does not seem to explain much beyond the bare code itself. PR-URL: #19404 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 38ed6c2 commit aba1ff2
Copy full SHA for aba1ff2

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-3
lines changed
Open diff view settings
Collapse file

‎test/sequential/test-fs-readfile-tostring-fail.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-fs-readfile-tostring-fail.js
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ for (let i = 0; i < 201; i++) {
3030

3131
stream.end();
3232
stream.on('finish', common.mustCall(function() {
33-
// make sure that the toString does not throw an error
3433
fs.readFile(file, 'utf8', common.mustCall(function(err, buf) {
3534
assert.ok(err instanceof Error);
36-
assert(/^(Array buffer allocation failed|"toString\(\)" failed)$/
37-
.test(err.message));
35+
assert.ok(/^(Array buffer allocation failed|"toString\(\)" failed)$/
36+
.test(err.message));
3837
assert.strictEqual(buf, undefined);
3938
}));
4039
}));

0 commit comments

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