Skip to content
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

Closed
wants to merge 9 commits into from

Conversation

mhdawson
Copy link
Member

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

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
@mhdawson
Copy link
Member Author

FYI, passed CI runs on my branch for 10.x, 8.x. 6.x and master.

napi-inl.h Show resolved Hide resolved
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

Choose a reason for hiding this comment

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

Nit: Once

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch

napi-inl.h Show resolved Hide resolved
Copy link
Contributor

@romandev romandev left a 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) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: if (
(one space)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for catching that.

mhdawson added a commit that referenced this pull request Sep 20, 2018
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]>
mhdawson added a commit that referenced this pull request Sep 20, 2018
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]>
@mhdawson
Copy link
Member Author

Landed as 73fed84

@mhdawson mhdawson closed this Sep 20, 2018
@mhdawson mhdawson reopened this Sep 20, 2018
@mhdawson
Copy link
Member Author

@mhdawson
Copy link
Member Author

CI back to green ,closing.

@mhdawson mhdawson closed this Sep 20, 2018
kevindavies8 added a commit to kevindavies8/node-addon-api-Develop that referenced this pull request Aug 24, 2022
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]>
Marlyfleitas added a commit to Marlyfleitas/node-api-addon-Development that referenced this pull request Aug 26, 2022
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]>
wroy7860 added a commit to wroy7860/addon-api-benchmark-node that referenced this pull request Sep 19, 2022
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]>
johnfrench3 pushed a commit to johnfrench3/node-addon-api-git that referenced this pull request Aug 11, 2023
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants