From 986d63cb8d9bac8afb6a6be68b8b39e224bb4fa1 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Thu, 29 Jan 2026 09:23:12 -0800 Subject: [PATCH] [test] Add assertion that constructor is a wrapper Wasm functions configured as constructors by configureAll are wrapped (as opposed to mutated in-place) to allow them to be called with `new`. Add an assertion that the constructor that appears on the JS side is not pointer-identical with the unwrapped Wasm function. --- test/js-api/custom-descriptors/configure-all.any.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/js-api/custom-descriptors/configure-all.any.js b/test/js-api/custom-descriptors/configure-all.any.js index 8595b979e..b70a35ae6 100644 --- a/test/js-api/custom-descriptors/configure-all.any.js +++ b/test/js-api/custom-descriptors/configure-all.any.js @@ -438,6 +438,7 @@ test(() => { const MyStruct = constructors.MyStruct; assert_equals(proto.constructor, MyStruct); + assert_not_equals(MyStruct, makeStructWithProto); assert_true(Object.hasOwn(MyStruct, "prototype")); assert_true(Object.hasOwn(MyStruct, "method"));