-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: add ability to control experimental tests #350
Conversation
Add the ability to specify a NAPI_VERSION which limits the tests executed to those supported by that version. As an example tests can be built/run as: npm test --NAPI_VERSION=3 Fixes: nodejs#349
It needs to be in its own file so we can avoid loading it completely on earlier Node.js versions
FYI, passed CI runs on my branch for 10.x, 8.x. 6.x and master. |
test/index.js
Outdated
// currently experimental only test if NAPI_VERSION | ||
// is set to experimental. We can't use C max int | ||
// as that is not supported as a number on earlier | ||
// Node.js versions. Oonce bigint is in a release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Once
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
test/index.js
Outdated
'objectwrap', | ||
'objectreference', | ||
'version_management' | ||
]; | ||
|
||
if((process.env.npm_config_NAPI_VERSION !== undefined) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: if (
(one space)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that.
Add the ability to specify a NAPI_VERSION which limits the tests executed to those supported by that version. As an example tests can be built/run as: npm test --NAPI_VERSION=3 Fixes: #349 PR-URL: #350 Fixes: #349 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Jinho Bang <[email protected]>
Add the ability to specify a NAPI_VERSION which limits the tests executed to those supported by that version. As an example tests can be built/run as: npm test --NAPI_VERSION=3 PR-URL: #350 Fixes: #349 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Jinho Bang <[email protected]>
Landed as 73fed84 |
CI run that tests across Node.js versions: https://ci.nodejs.org/view/x%20-%20Abi%20stable%20module%20API/job/node-test-node-addon-api-LTS%20versions/80/ |
CI back to green ,closing. |
Add the ability to specify a NAPI_VERSION which limits the tests executed to those supported by that version. As an example tests can be built/run as: npm test --NAPI_VERSION=3 PR-URL: nodejs/node-addon-api#350 Fixes: nodejs/node-addon-api#349 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Jinho Bang <[email protected]>
Add the ability to specify a NAPI_VERSION which limits the tests executed to those supported by that version. As an example tests can be built/run as: npm test --NAPI_VERSION=3 PR-URL: nodejs/node-addon-api#350 Fixes: nodejs/node-addon-api#349 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Jinho Bang <[email protected]>
Add the ability to specify a NAPI_VERSION which limits the tests executed to those supported by that version. As an example tests can be built/run as: npm test --NAPI_VERSION=3 PR-URL: nodejs/node-addon-api#350 Fixes: nodejs/node-addon-api#349 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Jinho Bang <[email protected]>
Add the ability to specify a NAPI_VERSION which limits the tests executed to those supported by that version. As an example tests can be built/run as: npm test --NAPI_VERSION=3 PR-URL: nodejs/node-addon-api#350 Fixes: nodejs/node-addon-api#349 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Jinho Bang <[email protected]>
Add the ability to specify a NAPI_VERSION which
limits the tests executed to those supported by that
version.
As an example tests can be built/run as:
npm test --NAPI_VERSION=3
Fixes: #349