test: Refactors variables to ES6 compatible and newer assertions #10023
Closed
shri3k wants to merge 3 commits intonodejs:masterfrom
Closed
test: Refactors variables to ES6 compatible and newer assertions #10023shri3k wants to merge 3 commits intonodejs:masterfrom
shri3k wants to merge 3 commits intonodejs:masterfrom
Conversation
- changes var to const/let
- changes assert.equal to assert.strictEqual
**Note: `process.on('exit')` wasn't able to change the handler to
`common.mustCall` because `common.mustCall` actually uses
`process.on('exit')` internally**
- changes var to const/let
- change assert.equal to assert.strictEqual
**Note: `process.on('exit')` wasn't able to change the handler to
`common.mustCall` because `common.mustCall` actually uses
`process.on('exit')` internally**
jasnell
approved these changes
Dec 5, 2016
mcollina
approved these changes
Dec 6, 2016
cjihrig
reviewed
Dec 6, 2016
test/parallel/test-tls-ticket.js
Outdated
| assert.strictEqual(ticketLog[i], ticketLog[i + 1]); | ||
|
|
||
| // 2nd connection should have different ticket | ||
| assert.notEqual(ticketLog[i], ticketLog[i + naturalServers.length]); |
Contributor
There was a problem hiding this comment.
Couldn't this also use assert.notStrictEqual()?
Contributor
Author
There was a problem hiding this comment.
Ah, I'll go ahead and make changes tonight. I was initially just checking for strictEqual.
cjihrig
approved these changes
Dec 6, 2016
Contributor
cjihrig
left a comment
There was a problem hiding this comment.
LGTM, but there are probably other improvements that could be made.
Member
- changes `notEqual` to `notStrictEqual`
Contributor
Author
|
@cjihrig went ahead and made the changes. Ready to be reviewed again. |
Member
Member
|
Merging now |
Member
|
Landed in 0c4c225. |
mcollina
pushed a commit
that referenced
this pull request
Dec 7, 2016
- changes var to const/let - changes assert.equal to assert.strictEqual - changes `notEqual` to `notStrictEqual` PR-URL: #10023 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
addaleax
pushed a commit
that referenced
this pull request
Dec 8, 2016
- changes var to const/let - changes assert.equal to assert.strictEqual - changes `notEqual` to `notStrictEqual` PR-URL: #10023 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
addaleax
pushed a commit
to addaleax/node
that referenced
this pull request
Dec 8, 2016
- changes var to const/let - changes assert.equal to assert.strictEqual - changes `notEqual` to `notStrictEqual` PR-URL: nodejs#10023 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Merged
MylesBorins
pushed a commit
that referenced
this pull request
Dec 20, 2016
- changes var to const/let - changes assert.equal to assert.strictEqual - changes `notEqual` to `notStrictEqual` PR-URL: #10023 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 21, 2016
- changes var to const/let - changes assert.equal to assert.strictEqual - changes `notEqual` to `notStrictEqual` PR-URL: #10023 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 21, 2016
- changes var to const/let - changes assert.equal to assert.strictEqual - changes `notEqual` to `notStrictEqual` PR-URL: #10023 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
make -j8 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
test
Description of change
varto eitherconstorletwhere applicableassert.equaltoassert.strictEqualfor more "strict" checkNote:- even though ticket was asking to change
process.on('exit')handler tocommon.mustCall- this was omitted as this kept breaking the test (my guess and from discussion with others was that it's becausecommon.mustCallhasprocess.on('exit')internally which never firesprocess.on('exit')in the test