Skip to content

Commit

Permalink
doc: update comments on test conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
legendecas committed Oct 31, 2019
1 parent 988e5c2 commit 34af5b3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ const napiVersion = Number(process.versions.napi)
const nodeMajorVersion = Number(process.versions.node.match(/\d+/)[0])

if (nodeMajorVersion < 10) {
// currently experimental only test if node major version
// is set to experimental. We can't use napi_experimental here
// as that is not supported as a number on earlier
// Node.js versions. Once bigint is in a release
// this should be guarded on the napi version
// in which bigint was added.
// Currently experimental only test if NODE_MAJOR_VERSION
// is greater than which it exists.
// We can't use NAPI_EXPERIMENTAL nor NAPI_VERSION here for
// those definition could presents on not supported Node.js
// targets.
// Once bigint is in a release this should be guarded on
// the NAPI_VERSION in which bigint was added.
testModules.splice(testModules.indexOf('bigint'), 1);
testModules.splice(testModules.indexOf('typedarray-bigint'), 1);
}
Expand Down

0 comments on commit 34af5b3

Please sign in to comment.