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
  • Loading branch information
MylesBorins committed Oct 6, 2020
1 parent 7d8e395 commit 73150f9
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 73150f9

Please sign in to comment.