Skip to content

Commit 60c616a

Browse files
committed
test: remove private property checks from wasm module-wrapper tests
1 parent ae8554c commit 60c616a

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

  • lib/node_modules/@stdlib/wasm/module-wrapper/test

lib/node_modules/@stdlib/wasm/module-wrapper/test/test.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
* limitations under the License.
1717
*/
1818

19-
/* eslint-disable no-underscore-dangle */
20-
2119
'use strict';
2220

2321
// MODULES //
@@ -92,7 +90,7 @@ tape( 'the `initialize` method returns a promise', opts, function test( t ) {
9290
t.end();
9391
});
9492

95-
tape( 'the `initialize` method properly sets `_module` and `_instance` properties', opts, function test( t ) {
93+
tape( 'the `initialize` method resolves with the module instance', opts, function test( t ) {
9694
var wasm;
9795
var mod;
9896

@@ -103,10 +101,7 @@ tape( 'the `initialize` method properly sets `_module` and `_instance` propertie
103101

104102
function onResolve( result ) {
105103
t.strictEqual( result, mod, 'resolves with module instance' );
106-
t.strictEqual( typeof result._module, 'object', '_module is set' );
107-
t.strictEqual( typeof result._instance, 'object', '_instance is set' );
108-
t.strictEqual( result._module.constructor.name, 'Module', '_module is a WebAssembly.Module' );
109-
t.strictEqual( result._instance.constructor.name, 'Instance', '_instance is a WebAssembly.Instance' );
104+
t.strictEqual( typeof result.exports, 'object', 'exports is accessible after initialization' );
110105
t.end();
111106
}
112107

@@ -135,7 +130,7 @@ tape( 'the `initializeAsync` method invokes a callback', opts, function test( t
135130
}
136131
});
137132

138-
tape( 'the `initializeAsync` method properly sets `_module` and `_instance` properties', opts, function test( t ) {
133+
tape( 'the `initializeAsync` method invokes callback with the module instance', opts, function test( t ) {
139134
var wasm;
140135
var mod;
141136

@@ -151,10 +146,7 @@ tape( 'the `initializeAsync` method properly sets `_module` and `_instance` prop
151146
return;
152147
}
153148
t.strictEqual( result, mod, 'callback receives module instance' );
154-
t.strictEqual( typeof result._module, 'object', '_module is set' );
155-
t.strictEqual( typeof result._instance, 'object', '_instance is set' );
156-
t.strictEqual( result._module.constructor.name, 'Module', '_module is a WebAssembly.Module' );
157-
t.strictEqual( result._instance.constructor.name, 'Instance', '_instance is a WebAssembly.Instance' );
149+
t.strictEqual( typeof result.exports, 'object', 'exports is accessible after initialization' );
158150
t.end();
159151
}
160152
});

0 commit comments

Comments
 (0)