Skip to content

Commit

Permalink
test: fix test suite to work with npm 7
Browse files Browse the repository at this point in the history
PR-URL: #35474
Reviewed-By: Ruy Adorno <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
Reviewed-By: Ben Coe <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
  • Loading branch information
MylesBorins committed Oct 7, 2020
1 parent 2e54524 commit c87641a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 35 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@ CONFLICT_RE=^>>>>>>> [0-9A-Fa-f]+|^<<<<<<< [A-Za-z]+

# Related CI job: node-test-linter
lint-ci: lint-js-ci lint-cpp lint-py lint-md lint-addon-docs
@if ! ( grep -IEqrs "$(CONFLICT_RE)" benchmark deps doc lib src test tools ) \
@if ! ( grep -IEqrs "$(CONFLICT_RE)" --exclude="error-message.js" benchmark deps doc lib src test tools ) \
&& ! ( $(FIND) . -maxdepth 1 -type f | xargs grep -IEqs "$(CONFLICT_RE)" ); then \
exit 0 ; \
else \
Expand Down
12 changes: 10 additions & 2 deletions test/addons/dlopen-ping-pong/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@ const bindingPath = require.resolve(`./build/${common.buildType}/binding`);
console.log('process.dlopen:', bindingPath);
process.dlopen(module, bindingPath,
os.constants.dlopen.RTLD_NOW | os.constants.dlopen.RTLD_GLOBAL);
console.log('module.exports.load:', `${path.dirname(bindingPath)}/ping.so`);
module.exports.load(`${path.dirname(bindingPath)}/ping.so`);

let pingSOPath = `${path.dirname(bindingPath)}/lib.target/ping.so`;

if (common.isOSX) {
pingSOPath = `${path.dirname(bindingPath)}/ping.so`;
}

console.log('module.exports.load:', pingSOPath);
module.exports.load(pingSOPath);

assert.strictEqual(module.exports.ping(), 'pong');

// Check that after the addon is loaded with
Expand Down
31 changes: 0 additions & 31 deletions test/parallel/test-macos-signed-deps.js

This file was deleted.

2 changes: 1 addition & 1 deletion test/parallel/test-npm-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ const npmPathPackageJson = path.resolve(
);

const pkg = require(npmPathPackageJson);
assert(pkg.version.match(/^\d+\.\d+\.\d+$/),
assert(pkg.version.match(/^\d+\.\d+\.\d+-rc\.\d+$/),
`unexpected version number: ${pkg.version}`);

0 comments on commit c87641a

Please sign in to comment.