File tree 2 files changed +11
-12
lines changed
2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -78,15 +78,16 @@ exports.mustNotCall = function(msg) {
78
78
exports . runTest = async function ( test , buildType ) {
79
79
buildType = buildType || process . config . target_defaults . default_configuration || 'Release' ;
80
80
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` ) ;
85
85
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 ( ) ) ;
90
91
}
91
92
92
93
exports . runTestWithBindingPath = async function ( test , buildType ) {
Original file line number Diff line number Diff line change 2
2
3
3
const assert = require ( 'assert' ) ;
4
4
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 ) ;
8
6
9
- function test ( binding , NAPI_CPP_EXCEPTIONS = false ) {
7
+ function test ( binding , NAPI_CPP_EXCEPTIONS ) {
10
8
function assertPropertyIs ( obj , key , attribute ) {
11
9
const propDesc = Object . getOwnPropertyDescriptor ( obj , key ) ;
12
10
assert . ok ( propDesc ) ;
You can’t perform that action at this time.
0 commit comments