• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// META: global=window,dedicatedworker,jsshell
2// META: script=/wasm/jsapi/wasm-module-builder.js
3
4test(() => {
5  const emptyModuleBinary = new WasmModuleBuilder().toBuffer();
6  const module = new WebAssembly.Module(emptyModuleBinary);
7  assert_class_string(module, "WebAssembly.Module");
8}, "Object.prototype.toString on an Module");
9
10test(() => {
11  assert_own_property(WebAssembly.Module.prototype, Symbol.toStringTag);
12
13  const propDesc = Object.getOwnPropertyDescriptor(WebAssembly.Module.prototype, Symbol.toStringTag);
14  assert_equals(propDesc.value, "WebAssembly.Module", "value");
15  assert_equals(propDesc.configurable, true, "configurable");
16  assert_equals(propDesc.enumerable, false, "enumerable");
17  assert_equals(propDesc.writable, false, "writable");
18}, "@@toStringTag exists on the prototype with the appropriate descriptor");
19