Skip to content

Commit c87641a

Browse files
committed
test: fix test suite to work with npm 7
PR-URL: #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>
1 parent 2e54524 commit c87641a

File tree

4 files changed

+12
-35
lines changed

4 files changed

+12
-35
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ CONFLICT_RE=^>>>>>>> [0-9A-Fa-f]+|^<<<<<<< [A-Za-z]+
13841384

13851385
# Related CI job: node-test-linter
13861386
lint-ci: lint-js-ci lint-cpp lint-py lint-md lint-addon-docs
1387-
@if ! ( grep -IEqrs "$(CONFLICT_RE)" benchmark deps doc lib src test tools ) \
1387+
@if ! ( grep -IEqrs "$(CONFLICT_RE)" --exclude="error-message.js" benchmark deps doc lib src test tools ) \
13881388
&& ! ( $(FIND) . -maxdepth 1 -type f | xargs grep -IEqs "$(CONFLICT_RE)" ); then \
13891389
exit 0 ; \
13901390
else \

test/addons/dlopen-ping-pong/test.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,16 @@ const bindingPath = require.resolve(`./build/${common.buildType}/binding`);
1212
console.log('process.dlopen:', bindingPath);
1313
process.dlopen(module, bindingPath,
1414
os.constants.dlopen.RTLD_NOW | os.constants.dlopen.RTLD_GLOBAL);
15-
console.log('module.exports.load:', `${path.dirname(bindingPath)}/ping.so`);
16-
module.exports.load(`${path.dirname(bindingPath)}/ping.so`);
15+
16+
let pingSOPath = `${path.dirname(bindingPath)}/lib.target/ping.so`;
17+
18+
if (common.isOSX) {
19+
pingSOPath = `${path.dirname(bindingPath)}/ping.so`;
20+
}
21+
22+
console.log('module.exports.load:', pingSOPath);
23+
module.exports.load(pingSOPath);
24+
1725
assert.strictEqual(module.exports.ping(), 'pong');
1826

1927
// Check that after the addon is loaded with

test/parallel/test-macos-signed-deps.js

-31
This file was deleted.

test/parallel/test-npm-version.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ const npmPathPackageJson = path.resolve(
1414
);
1515

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

0 commit comments

Comments
 (0)