Skip to content

Commit 73150f9

Browse files
committed
test: fix test suite to work with npm 7
1 parent 7d8e395 commit 73150f9

File tree

4 files changed

+12
-35
lines changed

4 files changed

+12
-35
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
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

Lines changed: 10 additions & 2 deletions
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

Lines changed: 0 additions & 31 deletions
This file was deleted.

test/parallel/test-npm-version.js

Lines changed: 1 addition & 1 deletion
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)