Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: run JSRuntime test func directly
Browse files Browse the repository at this point in the history
Instead of calling the bultin test functions
Indeed, it causes issue with type comparison.
See #184 (comment)
krichprollsch committed Mar 7, 2024
1 parent 7d25188 commit 5bdc50b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/run_tests.zig
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit 5bdc50b

Please sign in to comment.