🎨 test: include expected result in error messages#16039
Closed
keywordnew wants to merge 3 commits intonodejs:masterfrom
Closed
🎨 test: include expected result in error messages#16039keywordnew wants to merge 3 commits intonodejs:masterfrom
keywordnew wants to merge 3 commits intonodejs:masterfrom
Conversation
The script being tested for is expected to be present only if the analytics id is provided. To improve user experience, the error message indicates whether the script is expected to be present or not.
BridgeAR
reviewed
Oct 6, 2017
test/doctool/test-doctool-html.js
Outdated
| assert(actual.includes('google-analytics.com'), | ||
| 'Google Analytics script was not present'); | ||
| assert(actual.includes(scriptDomain), | ||
| 'Google Analytics script was not present, but it should be'); |
Member
There was a problem hiding this comment.
The idea here is to include the actual value and not only to change the message.
So it should actually be like
assert(actual.includes(scriptDomain),
`Google Analytics script was not present in "${actual}"`);
Member
There was a problem hiding this comment.
@chowdhurian could you push a commit to this branch that makes the change @BridgeAR suggested? LGTM with those changes.
Remove expected result from error message and include actual result for clarity and easier debugging.
gibfahn
approved these changes
Oct 7, 2017
tniessen
approved these changes
Oct 7, 2017
Member
Member
|
Linter failed not ok 30 - /usr/home/iojs/build/workspace/node-test-linter/test/doctool/test-doctool-html.js
---
message: Missing semicolon.
severity: error
data:
line: 118
column: 54
ruleId: semi
messages:
- message: Line 130 exceeds the maximum line length of 80.
severity: error
data:
line: 130
column: 1
ruleId: max-len
... |
Linter errored for missing semi colon and line length.
Contributor
|
Rerun linter: https://ci.nodejs.org/job/node-test-linter/12334/ ✔️ |
hiroppy
approved these changes
Oct 8, 2017
BridgeAR
approved these changes
Oct 9, 2017
Member
|
Landed in 6a9fd06 Thanks for the PR, and congratulations on becoming a Node.js Contributor 🎉 ! |
BridgeAR
pushed a commit
that referenced
this pull request
Oct 9, 2017
PR-URL: #16039 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins
pushed a commit
that referenced
this pull request
Oct 11, 2017
PR-URL: #16039 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Merged
addaleax
pushed a commit
to addaleax/ayo
that referenced
this pull request
Oct 12, 2017
PR-URL: nodejs/node#16039 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins
pushed a commit
that referenced
this pull request
Oct 17, 2017
PR-URL: #16039 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Merged
MylesBorins
pushed a commit
that referenced
this pull request
Oct 18, 2017
PR-URL: #16039 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins
pushed a commit
that referenced
this pull request
Oct 25, 2017
PR-URL: #16039 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Merged
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.
The script being tested for is expected to be present only if the analytics id is provided. To improve user experience, the error message indicates whether the script is expected to be present or not.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test