import-reflection.js (427B)
1 let module = new WebAssembly.Module(wasmTextToBinary(`(module 2 (func 3 (import "wasm:js-string" "test") 4 (param externref) 5 (result i32) 6 ) 7 (global (import "'" "string") (ref extern)) 8 )`), {builtins: ['js-string'], importedStringConstants: "'"}); 9 let imports = WebAssembly.Module.imports(module); 10 11 // All imports that refer to a builtin module are suppressed from import 12 // reflection. 13 assertEq(imports.length, 0);