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: nodejs#35474
Reviewed-By: Ruy Adorno <ruyadorno@github.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
MylesBorins authored and joesepi committed Oct 22, 2020
1 parent de0ef03 commit fc6796f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 35 deletions.
2 changes: 1 addition & 1 deletion Makefile
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
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
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 fc6796f

Please sign in to comment.