Skip to content

Conversation

@nfriedly
Copy link
Contributor

@nfriedly nfriedly commented Oct 11, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change

Updates the mustCall() function in test/common.js to use to default the expected parameter to 1 and validate that it is a non-negative number.

This change will prevent issues such as the one fixed in the first commit on
#9031

Updates expected to use modern default syntax and also validate the value
and throw an error rather than silently overwriting invalid arguments.

Would prevent issues such as the one fixed in the first commit on
nodejs#9031
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Oct 11, 2016
@nfriedly nfriedly closed this Oct 11, 2016
@nfriedly
Copy link
Contributor Author

Doh, the tests don't pass, because this checks for bugs discovered and fixed in #9031 - I'm merging it back into that PR and killing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants