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 committed 2024-03-08 12:24:24 +01:00
1 parent fec212ab94
commit 500da5bfd8
1 file changed
+3 -2
+3 -2
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();