test: run JSRuntime test func directly

Instead of calling the bultin test functions
Indeed, it causes issue with type comparison.
See https://github.com/lightpanda-io/browsercore/pull/184#issuecomment-1964369066
This commit is contained in:
Pierre Tachoire
2024-03-07 14:39:20 +01:00
parent fec212ab94
commit 500da5bfd8

View File

@@ -36,7 +36,6 @@ fn testExecFn(
js_env: *jsruntime.Env,
comptime execFn: jsruntime.ContextExecFn,
) anyerror!void {
// start JS env
try js_env.start(alloc);
defer js_env.stop();
@@ -89,6 +88,8 @@ fn testsAllExecFn(
}
pub fn main() !void {
try testJSRuntime();
std.debug.print("\n", .{});
for (builtin.test_functions) |test_fn| {
try test_fn.func();
@@ -104,7 +105,7 @@ test {
std.testing.refAllDecls(DumpTest);
}
test "jsruntime" {
fn testJSRuntime() !void {
// generate tests
try generate.tests();