Skip to content

test: refactor test-stream2-writable - #10353

Closed
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:stream2-writable
Closed

test: refactor test-stream2-writable#10353
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:stream2-writable

Conversation

@Trott

Copy link
Copy Markdown
Member
  • replace setTimeout() with setImmediate()
  • assert.equal() -> assert.strictEqual()
  • remove unused function arguments
  • normalize indentation
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test stream

Description of change
* replace setTimeout() with setImmediate()
* assert.equal() -> assert.strictEqual()
* remove unused function arguments
* normalize indentation

@TrottTrott added stream Issues and PRs related to the stream subsystem. test Issues and PRs related to the tests. labels Dec 20, 2016
@julianduque

Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a slight difference between setTimeout and setImmediate, given where they are executed in the event loop. If it is indifferent for the test, e.g. even process.nextTick is fine, then add it as a comment.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting to setTimeout() just to be 100% sure we're not modifying the test behavior in a way that might undermine the purpose of the test.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you do process.nextTick(process.nextTick(setImmediate( you should virtually guarantee adding it to the end of the next processing of immediates, fwiw.

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a nit

* replace setTimeout() with setImmediate()
* assert.equal() -> assert.strictEqual()
* remove unused function arguments
* normalize indentation
@Trott

Copy link
Copy Markdown
MemberAuthor

Trott added a commit to Trott/io.js that referenced this pull request Dec 23, 2016
* add duration to setTimeout()
* assert.equal() -> assert.strictEqual()
* remove unused function arguments
* normalize indentation
PR-URL: nodejs#10353
Reviewed-By: Julian Duque <julianduquej@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@Trott

Copy link
Copy Markdown
MemberAuthor

Landed in 7472521.

@TrottTrott closed this Dec 23, 2016
@evanlucasevanlucas mentioned this pull request Jan 3, 2017
evanlucas pushed a commit that referenced this pull request Jan 3, 2017
* add duration to setTimeout()
* assert.equal() -> assert.strictEqual()
* remove unused function arguments
* normalize indentation
PR-URL: #10353
Reviewed-By: Julian Duque <julianduquej@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
evanlucas pushed a commit that referenced this pull request Jan 4, 2017
* add duration to setTimeout()
* assert.equal() -> assert.strictEqual()
* remove unused function arguments
* normalize indentation
PR-URL: #10353
Reviewed-By: Julian Duque <julianduquej@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
* add duration to setTimeout()
* assert.equal() -> assert.strictEqual()
* remove unused function arguments
* normalize indentation
PR-URL: #10353
Reviewed-By: Julian Duque <julianduquej@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
* add duration to setTimeout()
* assert.equal() -> assert.strictEqual()
* remove unused function arguments
* normalize indentation
PR-URL: #10353
Reviewed-By: Julian Duque <julianduquej@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
* add duration to setTimeout()
* assert.equal() -> assert.strictEqual()
* remove unused function arguments
* normalize indentation
PR-URL: #10353
Reviewed-By: Julian Duque <julianduquej@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
* add duration to setTimeout()
* assert.equal() -> assert.strictEqual()
* remove unused function arguments
* normalize indentation
PR-URL: #10353
Reviewed-By: Julian Duque <julianduquej@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This was referenced Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
* add duration to setTimeout()
* assert.equal() -> assert.strictEqual()
* remove unused function arguments
* normalize indentation
PR-URL: #10353
Reviewed-By: Julian Duque <julianduquej@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 1, 2017
* add duration to setTimeout()
* assert.equal() -> assert.strictEqual()
* remove unused function arguments
* normalize indentation
PR-URL: #10353
Reviewed-By: Julian Duque <julianduquej@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@Trott
Trott deleted the stream2-writable branch January 13, 2022 22:44
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streamIssues and PRs related to the stream subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Trott@julianduque@mcollina@Fishrock123@MylesBorins@nodejs-github-bot