Skip to content

test: change assert message arg from literal to template literal - #16843

Closed
markmcnelis wants to merge 4 commits into
nodejs:masterfrom
markmcnelis:node-contribution
Closed

test: change assert message arg from literal to template literal#16843
markmcnelis wants to merge 4 commits into
nodejs:masterfrom
markmcnelis:node-contribution

Conversation

@markmcnelis

Copy link
Copy Markdown
Contributor
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Nov 6, 2017
@markmcnelismarkmcnelis changed the title Node contributiontest: change assert message arg from literal to template literalNov 6, 2017
@mscdexmscdex added v8 engine Issues and PRs related to the V8 dependency. vm Issues and PRs related to the vm subsystem. labels Nov 6, 2017
Trott
Trott previously requested changes Nov 6, 2017

@TrottTrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @markmcnelis! Welcome, and thanks for the PR! I have some small changes I hope you can make and then push to your branch (so it will update this PR). Thanks!

Comment threadtest/parallel/test-global.js Outdated
assert.strictEqual(global.baseFoo, 'foo',
'x -> global.x in base level not working');
// eslint-disable-next-line no-undef
`${baseFoo} -> global.baseFoo in base level not

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This would result in very confusing message, IMO. I think you might be misunderstanding the original error message text.

Try removing the eslint-disable-line comment that was added and using something like this for the message instead:

`x -> global.x failed: global.baseDir = ${global.baseDir}`

Comment threadtest/parallel/test-global.js Outdated
'bar',
'global.x -> x in base level not working');
// eslint-disable-next-line no-undef
`${global.baseBar} -> baseBar in base level not

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This too will be very confusing: "bar -> baseBar in base level not working"....huh?

Try something like this instead:

`global.x -> x failed: baseBar = ${baseBar}`

@TrottTrott added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Nov 6, 2017
@markmcnelis

Copy link
Copy Markdown
ContributorAuthor

Hi @Trott! Thanks for your input. I've made some changes based on your feedback. Please review if you get a chance. Thanks

@gireeshpunathil

Copy link
Copy Markdown
Member

@Trott
Trott dismissed their stale reviewNovember 7, 2017 13:36

Looks good to me if the linter doesn't complain and CI is green. Thanks!

Trott pushed a commit to Trott/io.js that referenced this pull request Nov 7, 2017
PR-URL: nodejs#16843
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@Trott

Trott commented Nov 7, 2017

Copy link
Copy Markdown
Member

Landed in 9468108.
Thanks for the contribution! 🎉

@TrottTrott closed this Nov 7, 2017
evanlucas pushed a commit that referenced this pull request Nov 13, 2017
PR-URL: #16843
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@evanlucasevanlucas mentioned this pull request Nov 13, 2017
MylesBorins pushed a commit that referenced this pull request Nov 17, 2017
PR-URL: #16843
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@gibfahngibfahn mentioned this pull request Nov 21, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-and-learnIssues related to the Code-and-Learn events and PRs submitted during the events.testIssues and PRs related to the tests.v8 engineIssues and PRs related to the V8 dependency.vmIssues and PRs related to the vm subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@markmcnelis@gireeshpunathil@Trott@lpinca@mscdex@MylesBorins@nodejs-github-bot