Skip to content

test: update test-fs-write-file #10030

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

radelmann
Copy link
Contributor

@radelmann radelmann commented Dec 1, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change
  • Changed all instances of var to either const or let.
  • Changed all instances of assert.equal() to assert.strictEqual().
  • Changed all instances of if (e) throw e checks with assert.ifError(e).

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@imyller imyller added code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. fs Issues and PRs related to the fs subsystem / file system. labels Dec 1, 2016
@imyller
Copy link
Member

imyller commented Dec 1, 2016

@radelmann May I kindly ask you to format the commit message as described in CONTRIBUTING guidelines.

@radelmann radelmann force-pushed the FIRST-PR branch 2 times, most recently from 0e81222 to 20941b1 Compare December 1, 2016 18:12
@radelmann radelmann changed the title Update test/parallel/test-fs-write-file.js to use ES6 features Update test/parallel/test-fs-write-file.js to use ES6 features and assert.strictEqual Dec 1, 2016
@radelmann radelmann changed the title Update test/parallel/test-fs-write-file.js to use ES6 features and assert.strictEqual Update test/parallel/test-fs-write-file.js to use const/let and assert.strictEqual Dec 1, 2016
@radelmann radelmann changed the title Update test/parallel/test-fs-write-file.js to use const/let and assert.strictEqual Update test-fs-write-file.js to use const/let and assert.strictEqual Dec 1, 2016
@radelmann radelmann changed the title Update test-fs-write-file.js to use const/let and assert.strictEqual test: test-fs-write-file.js change to use const/let and assert.strictEqual Dec 1, 2016
@radelmann radelmann changed the title test: test-fs-write-file.js change to use const/let and assert.strictEqual test: use const/let and assert.strictEqual Dec 1, 2016
@radelmann radelmann changed the title test: use const/let and assert.strictEqual test: update test-fs-write-file Dec 1, 2016
'前196年和前179年,南越国曾先后两次名义上臣属于西汉,成为西汉的“外臣”。前112年,' +
'南越国末代君主赵建德与西汉发生战争,被汉武帝于前111年所灭。南越国共存在93年,' +
'历经五代君主。南越国是岭南地区的第一个有记载的政权国家,采用封建制和郡县制并存的制度,' +
'它的建立保证了秦末乱世岭南地区社会秩序的稳定,有效的改善了岭南地区落后的政治、##济现状。\n';

fs.writeFile(filename, s, common.mustCall(function(e) {
if (e) throw e;
Copy link
Contributor

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).
@Trott
Copy link
Member

Trott commented Dec 4, 2016

Copy link
Member

@Trott Trott left a 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 ✅

@Trott
Copy link
Member

Trott commented Dec 4, 2016

Landed in f23dc6e4e597acb4ddae97b307a30c5b277054c0. Thanks for the contribution! 🎉

@Trott Trott closed this Dec 4, 2016
Trott pushed a commit to Trott/io.js that referenced this pull request Dec 4, 2016
Replaced all error checks with assert.ifError(e).

PR-URL: nodejs#10030
Reviewed-By: Rich Trott <rtrott@gmail.com>
addaleax pushed a commit that referenced this pull request Dec 5, 2016
Replaced all error checks with assert.ifError(e).

PR-URL: #10030
Reviewed-By: Rich Trott <rtrott@gmail.com>
@Fishrock123 Fishrock123 mentioned this pull request Dec 5, 2016
2 tasks
addaleax pushed a commit to addaleax/node that referenced this pull request Dec 8, 2016
Replaced all error checks with assert.ifError(e).

PR-URL: nodejs#10030
Reviewed-By: Rich Trott <rtrott@gmail.com>
jmdarling pushed a commit to jmdarling/node that referenced this pull request Dec 8, 2016
Replaced all error checks with assert.ifError(e).

PR-URL: nodejs#10030
Reviewed-By: Rich Trott <rtrott@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
Replaced all error checks with assert.ifError(e).

PR-URL: #10030
Reviewed-By: Rich Trott <rtrott@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 21, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. fs Issues and PRs related to the fs subsystem / file system. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants