Skip to content

test: add ability to control experimental tests#350

Closed
mhdawson wants to merge 9 commits intonodejs:masterfrom
mhdawson:fixci-bigint
Closed

test: add ability to control experimental tests#350
mhdawson wants to merge 9 commits intonodejs:masterfrom
mhdawson:fixci-bigint

Conversation

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

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

Comment thread napi-inl.h
Comment thread 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit: Once

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

good catch

Comment thread napi-inl.h
Copy link
Copy Markdown
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

Comment thread test/index.js Outdated
'version_management'
];

if((process.env.npm_config_NAPI_VERSION !== undefined) &&
Copy link
Copy Markdown
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
Copy Markdown
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 <me@gus.host>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Jinho Bang <zino@chromium.org>
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 <me@gus.host>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Jinho Bang <zino@chromium.org>
@mhdawson
Copy link
Copy Markdown
Member Author

Landed as 73fed84

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

@mhdawson
Copy link
Copy Markdown
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 <me@gus.host>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Jinho Bang <zino@chromium.org>
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 <me@gus.host>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Jinho Bang <zino@chromium.org>
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 <me@gus.host>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Jinho Bang <zino@chromium.org>
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 <me@gus.host>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Jinho Bang <zino@chromium.org>
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