Skip to content

Conversation

@BridgeAR
Copy link

@BridgeAR BridgeAR commented Sep 6, 2018

The Node core assert module will likely soon change some error
messages by combining individual error messages with an auto-generated
one. This makes sure all tests pass in all cases.

Checklist

  • run npm run test and npm run benchmark
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message and code follows Code of conduct

The Node core assert module will likely soon change some error
messages by combining individual error messages with an auto-generated
one. This makes sure all tests pass in all cases.
t.fail('should throw')
} catch (err) {
t.is(err.message, `The decorator 'plugin' is not present in Request`)
t.ok(/The decorator 'plugin' is not present in Request/.test(err.message))
Copy link
Member

Choose a reason for hiding this comment

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

Why not use t.match?

Copy link
Author

Choose a reason for hiding this comment

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

Because it was not used in other tests (they used this pattern). If requested, I can change that.

Copy link
Member

Choose a reason for hiding this comment

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

I think it would be better to use the framework provided assertion. It will indicate that a test failed because the string does not match the provided regex. Using t.ok it will only report that a value was false instead of true.

@mcollina
Copy link
Member

mcollina commented Sep 6, 2018

What willl be the new message in this case?

@mcollina
Copy link
Member

mcollina commented Sep 6, 2018

I do not understand how that PR in core could cause such a breakage.

Copy link
Member

@allevo allevo left a comment

Choose a reason for hiding this comment

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

Nice!

t.plan(2)
try {
const f = require('..')('lol') // eslint-disable-line
require('..')('lol') // eslint-disable-line
Copy link
Member

Choose a reason for hiding this comment

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

I think we can remove the eslint comment

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

@stale
Copy link

stale bot commented Sep 21, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue or pr with more than 15 days of inactivity. label Sep 21, 2018
@stale stale bot closed this Sep 28, 2018
@cemremengu cemremengu reopened this Sep 28, 2018
@stale stale bot removed the stale Issue or pr with more than 15 days of inactivity. label Sep 28, 2018
@cemremengu cemremengu added the chore Small changes or internal project maintenance label Sep 28, 2018
@stale
Copy link

stale bot commented Oct 13, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue or pr with more than 15 days of inactivity. label Oct 13, 2018
@cemremengu cemremengu removed the stale Issue or pr with more than 15 days of inactivity. label Oct 13, 2018
@cemremengu
Copy link
Contributor

Any updates here?

@stale
Copy link

stale bot commented Oct 28, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue or pr with more than 15 days of inactivity. label Oct 28, 2018
@stale stale bot closed this Nov 4, 2018
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

chore Small changes or internal project maintenance stale Issue or pr with more than 15 days of inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants