Fix test call to jsruntime.loadEnv

Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
This commit is contained in:
Francis Bouvier
2023-03-01 11:47:06 +01:00
parent 3fcc507cce
commit 081daa1245
2 changed files with 5 additions and 5 deletions

View File

@@ -40,7 +40,9 @@ test {
const vm = jsruntime.VM.init();
defer vm.deinit();
var alloc = jsruntime.bench_allocator(std.testing.allocator);
var bench_alloc = jsruntime.bench_allocator(std.testing.allocator);
var arena_alloc = std.heap.ArenaAllocator.init(bench_alloc.allocator());
defer arena_alloc.deinit();
try jsruntime.loadEnv(alloc.allocator(), false, testsExecFn, apis);
try jsruntime.loadEnv(&arena_alloc, testsExecFn, apis);
}