-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: update test-fs-write-file #10030
Conversation
@radelmann May I kindly ask you to format the commit message as described in CONTRIBUTING guidelines. |
0e81222
to
20941b1
Compare
'前196年和前179年,南越国曾先后两次名义上臣属于西汉,成为西汉的“外臣”。前112年,' + | ||
'南越国末代君主赵建德与西汉发生战争,被汉武帝于前111年所灭。南越国共存在93年,' + | ||
'历经五代君主。南越国是岭南地区的第一个有记载的政权国家,采用封建制和郡县制并存的制度,' + | ||
'它的建立保证了秦末乱世岭南地区社会秩序的稳定,有效的改善了岭南地区落后的政治、##济现状。\n'; | ||
|
||
fs.writeFile(filename, s, common.mustCall(function(e) { | ||
if (e) throw e; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're here, would you mind replacing all the if (e) throw e;
checks with assert.ifError(e);
?
Changed all instances of var to either const or let. Changed all instances of assert.equal() to assert.strictEqual(). Replaced all error checks with assert.ifError(e).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if CI is ✅
Landed in f23dc6e4e597acb4ddae97b307a30c5b277054c0. Thanks for the contribution! 🎉 |
Replaced all error checks with assert.ifError(e). PR-URL: nodejs#10030 Reviewed-By: Rich Trott <[email protected]>
Replaced all error checks with assert.ifError(e). PR-URL: #10030 Reviewed-By: Rich Trott <[email protected]>
Replaced all error checks with assert.ifError(e). PR-URL: nodejs#10030 Reviewed-By: Rich Trott <[email protected]>
Replaced all error checks with assert.ifError(e). PR-URL: nodejs#10030 Reviewed-By: Rich Trott <[email protected]>
Replaced all error checks with assert.ifError(e). PR-URL: #10030 Reviewed-By: Rich Trott <[email protected]>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test
Description of change
var
to eitherconst
orlet
.assert.equal()
toassert.strictEqual()
.if (e) throw e
checks withassert.ifError(e)
.