Skip to content

Conversation

@Trott
Copy link
Member

@TrottTrott commented Oct 7, 2018

First commit:

test: remove internal errorCache property

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.

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

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.
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-botnodejs-github-bot added the assert Issues and PRs related to the assert subsystem. label Oct 7, 2018
@Trott
Copy link
MemberAuthor

Trott commented Oct 7, 2018

Copy link
Member

@BridgeARBridgeAR left a comment

Choose a reason for hiding this comment

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

This is definitely a good idea!

assert.ok(threw);
}else{
const{ writeFileSync }=require('fs');
const[,,,filename,line,column]=process.argv;
Copy link
Member

Choose a reason for hiding this comment

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

I somehow fail to see how the line and column is passed through to the child.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Ugh! That's because it's not! Fixed! Thanks.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

(See line 28. I had line, column missing before.)

@Trott
Copy link
MemberAuthor

Trott commented Oct 8, 2018

@Trott
Copy link
MemberAuthor

Trott commented Oct 9, 2018

/ping @nodejs/assert @nodejs/testing This needs one more review.

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 <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
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 <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
@Trott
Copy link
MemberAuthor

Trott commented Oct 9, 2018

Landed in 157d507...4d58c08

@TrottTrott closed this Oct 9, 2018
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 <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
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 <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
@targostargos mentioned this pull request 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 <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
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 <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
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 <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
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 <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
@TrottTrott deleted the vancouver-03 branch January 13, 2022 22:50
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assertIssues and PRs related to the assert subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Trott@nodejs-github-bot@thefourtheye@BridgeAR