toString.tentative.any.js (837B)
1 // META: global=window,dedicatedworker,jsshell,shadowrealm 2 3 test(() => { 4 const argument = { parameters: [] }; 5 const tag = new WebAssembly.Tag(argument); 6 const exn = new WebAssembly.Exception(tag, []); 7 assert_class_string(exn, "WebAssembly.Exception"); 8 }, "Object.prototype.toString on an Exception"); 9 10 test(() => { 11 assert_own_property(WebAssembly.Exception.prototype, Symbol.toStringTag); 12 13 const propDesc = Object.getOwnPropertyDescriptor( 14 WebAssembly.Exception.prototype, 15 Symbol.toStringTag 16 ); 17 assert_equals(propDesc.value, "WebAssembly.Exception", "value"); 18 assert_equals(propDesc.configurable, true, "configurable"); 19 assert_equals(propDesc.enumerable, false, "enumerable"); 20 assert_equals(propDesc.writable, false, "writable"); 21 }, "@@toStringTag exists on the prototype with the appropriate descriptor");