test,assert: remove internal errorCache property#23304
Closed
Trott wants to merge 3 commits intonodejs:masterfrom
Closed
test,assert: remove internal errorCache property#23304Trott wants to merge 3 commits intonodejs:masterfrom
Trott wants to merge 3 commits intonodejs:masterfrom
Conversation
The internal `assert` modules `errorCache` property is exposed only for testing. The one test that used it is rewritten here to not use it. This has the following advantages: * The test now makes sure that there is an empty cache in a more robust way. Instead of relying on the internal implementation of `errorCache`, it simply spawns a separate process. * One less test using the `--expose-internals` flag.
The internal assert module exposed an errorCache property solely for testing. It is no longer necessary. Remove it.
Member
Author
BridgeAR
reviewed
Oct 8, 2018
Member
BridgeAR
left a comment
There was a problem hiding this comment.
This is definitely a good idea!
| assert.ok(threw); | ||
| } else { | ||
| const { writeFileSync } = require('fs'); | ||
| const [, , , filename, line, column] = process.argv; |
Member
There was a problem hiding this comment.
I somehow fail to see how the line and column is passed through to the child.
Member
Author
There was a problem hiding this comment.
Ugh! That's because it's not! Fixed! Thanks.
Member
Author
There was a problem hiding this comment.
(See line 28. I had line, column missing before.)
Member
Author
|
Post-fixup CI: https://ci.nodejs.org/job/node-test-pull-request/17681/ ✔️ |
BridgeAR
approved these changes
Oct 8, 2018
Member
Author
|
/ping @nodejs/assert @nodejs/testing This needs one more review. |
thefourtheye
approved these changes
Oct 9, 2018
Trott
added a commit
to Trott/io.js
that referenced
this pull request
Oct 9, 2018
The internal `assert` modules `errorCache` property is exposed only for testing. The one test that used it is rewritten here to not use it. This has the following advantages: * The test now makes sure that there is an empty cache in a more robust way. Instead of relying on the internal implementation of `errorCache`, it simply spawns a separate process. * One less test using the `--expose-internals` flag. PR-URL: nodejs#23304 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Trott
added a commit
to Trott/io.js
that referenced
this pull request
Oct 9, 2018
The internal assert module exposed an errorCache property solely for testing. It is no longer necessary. Remove it. PR-URL: nodejs#23304 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Member
Author
|
Landed in 157d507...4d58c08 |
targos
pushed a commit
that referenced
this pull request
Oct 10, 2018
The internal `assert` modules `errorCache` property is exposed only for testing. The one test that used it is rewritten here to not use it. This has the following advantages: * The test now makes sure that there is an empty cache in a more robust way. Instead of relying on the internal implementation of `errorCache`, it simply spawns a separate process. * One less test using the `--expose-internals` flag. PR-URL: #23304 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
targos
pushed a commit
that referenced
this pull request
Oct 10, 2018
The internal assert module exposed an errorCache property solely for testing. It is no longer necessary. Remove it. PR-URL: #23304 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This was referenced Oct 10, 2018
sagitsofan
pushed a commit
to sagitsofan/node
that referenced
this pull request
Oct 12, 2018
The internal `assert` modules `errorCache` property is exposed only for testing. The one test that used it is rewritten here to not use it. This has the following advantages: * The test now makes sure that there is an empty cache in a more robust way. Instead of relying on the internal implementation of `errorCache`, it simply spawns a separate process. * One less test using the `--expose-internals` flag. PR-URL: nodejs#23304 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
sagitsofan
pushed a commit
to sagitsofan/node
that referenced
this pull request
Oct 12, 2018
The internal assert module exposed an errorCache property solely for testing. It is no longer necessary. Remove it. PR-URL: nodejs#23304 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
jasnell
pushed a commit
that referenced
this pull request
Oct 17, 2018
The internal `assert` modules `errorCache` property is exposed only for testing. The one test that used it is rewritten here to not use it. This has the following advantages: * The test now makes sure that there is an empty cache in a more robust way. Instead of relying on the internal implementation of `errorCache`, it simply spawns a separate process. * One less test using the `--expose-internals` flag. PR-URL: #23304 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
jasnell
pushed a commit
that referenced
this pull request
Oct 17, 2018
The internal assert module exposed an errorCache property solely for testing. It is no longer necessary. Remove it. PR-URL: #23304 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@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.
First commit:
test: remove internal errorCache property
The internal
assertmoduleserrorCacheproperty is exposed only fortesting. The one test that used it is rewritten here to not use it.
This has the following advantages:
The test now makes sure that there is an empty cache in a more robust
way. Instead of relying on the internal implementation of
errorCache, it simply spawns a separate process.One less test using the
--expose-internalsflag.Second commit:
assert: remove internal errorCache property
The internal assert module exposed an errorCache property solely for
testing. It is no longer necessary. Remove it.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes