Should there be a special case in assert_return for ref.null in the JS spec harness?
On the wasm-3.0 branch, there's a few cases in the spec tests where an assert_return expects to get a ref.null, like in this test from select.wast:
(assert_return (invoke "join-funcnull" (i32.const 0)) (ref.null))
Compiling to JS, this produces:
assert_return(() => call($1, "join-funcnull", [0]), "ref.null");
Other special patterns, like NaNs or "ref.func", have special handling in the test harness so that we don't literally compare against the string "ref.func" or otherwise. For "ref.null" though, there is no such case, so returning JS null from join-funcnull (which as far as I can tell is correct per the JS API spec?) seems to fail the test. Is this intended somehow? Or is the harness just missing another case that checks for JS null values?
Yes, this appears to be an oversight. Would you be interested in creating a PR to fix it?
Okay, I ported the internal test harness to sync/async, which had been out of date. This should work now, please let me know if there still are problems.