assert: minor assert improvements by BridgeAR · Pull Request #27525 · nodejs/node

@nodejs-github-bot added the assert

Issues and PRs related to the assert subsystem.

label

May 1, 2019
This makes sure the error message visible in the error stack created
when using `assert.fail()` without any arguments or the message set
to `undefined` or `null` as only argument.
That was masked before due to other changes.
This makes sure that the error message is more appropriate than
before by checking closer what operator is used and which is not.

It also increases the total number of lines printed to the user.
This reduces the total amount of reads when using `assert.ok()` with
a falsy value. That increases the read performance significantly.

Also remove a comment that can not be addressed.

@BridgeAR BridgeAR added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

May 3, 2019

@BridgeAR

Trott pushed a commit to Trott/io.js that referenced this pull request

May 5, 2019
This makes sure the error message visible in the error stack created
when using `assert.fail()` without any arguments or the message set
to `undefined` or `null` as only argument.
That was masked before due to other changes.

PR-URL: nodejs#27525
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

Trott pushed a commit to Trott/io.js that referenced this pull request

May 5, 2019
This makes sure that the error message is more appropriate than
before by checking closer what operator is used and which is not.

It also increases the total number of lines printed to the user.

PR-URL: nodejs#27525
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

Trott pushed a commit to Trott/io.js that referenced this pull request

May 5, 2019
This reduces the total amount of reads when using `assert.ok()` with
a falsy value. That increases the read performance significantly.

Also remove a comment that can not be addressed.

PR-URL: nodejs#27525
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

BridgeAR added a commit that referenced this pull request

May 6, 2019
This makes sure the error message visible in the error stack created
when using `assert.fail()` without any arguments or the message set
to `undefined` or `null` as only argument.
That was masked before due to other changes.

PR-URL: #27525
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

BridgeAR added a commit that referenced this pull request

May 6, 2019
This makes sure that the error message is more appropriate than
before by checking closer what operator is used and which is not.

It also increases the total number of lines printed to the user.

PR-URL: #27525
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

BridgeAR added a commit that referenced this pull request

May 6, 2019
This reduces the total amount of reads when using `assert.ok()` with
a falsy value. That increases the read performance significantly.

Also remove a comment that can not be addressed.

PR-URL: #27525
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

targos pushed a commit that referenced this pull request

May 7, 2019
This makes sure the error message visible in the error stack created
when using `assert.fail()` without any arguments or the message set
to `undefined` or `null` as only argument.
That was masked before due to other changes.

PR-URL: #27525
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

targos pushed a commit that referenced this pull request

May 7, 2019
This makes sure that the error message is more appropriate than
before by checking closer what operator is used and which is not.

It also increases the total number of lines printed to the user.

PR-URL: #27525
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

targos pushed a commit that referenced this pull request

May 7, 2019
This reduces the total amount of reads when using `assert.ok()` with
a falsy value. That increases the read performance significantly.

Also remove a comment that can not be addressed.

PR-URL: #27525
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

@BridgeAR BridgeAR deleted the minor-assert-improvements branch

January 20, 2020 12:03