Skip to content

Commit dc30134

Browse files
committed
fixup! buildType='Release'
1 parent 78b1d9a commit dc30134

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

test/common/index.js

+9-8
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,16 @@ exports.mustNotCall = function(msg) {
7878
exports.runTest = async function(test, buildType) {
7979
buildType = buildType || process.config.target_defaults.default_configuration || 'Release';
8080

81-
const bindings = [
82-
`../build/${buildType}/binding.node`,
83-
`../build/${buildType}/binding_noexcept.node`,
84-
].map(it => require.resolve(it));
81+
const binding =
82+
require.resolve(`../build/${buildType}/binding.node`);
83+
const binding_noexcept =
84+
require.resolve(`../build/${buildType}/binding_noexcept.node`);
8585

86-
for (const item of bindings) {
87-
await Promise.resolve(test(require(item)))
88-
.finally(exports.mustCall());
89-
}
86+
await Promise.resolve(test(require(binding), true))
87+
.finally(exports.mustCall());
88+
89+
await Promise.resolve(test(require(binding_noexcept), false))
90+
.finally(exports.mustCall());
9091
}
9192

9293
exports.runTestWithBindingPath = async function(test, buildType) {

test/object/object.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22

33
const assert = require('assert');
44

5-
const buildType = 'Release';
6-
test(require(`../build/${buildType}/binding.node`), true);
7-
test(require(`../build/${buildType}/binding_noexcept.node`));
5+
module.exports = require('../common').runTest(test);
86

9-
function test(binding, NAPI_CPP_EXCEPTIONS = false) {
7+
function test(binding, NAPI_CPP_EXCEPTIONS) {
108
function assertPropertyIs(obj, key, attribute) {
119
const propDesc = Object.getOwnPropertyDescriptor(obj, key);
1210
assert.ok(propDesc);

0 commit comments

Comments
 (0)