mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 15:41:48 +00:00
Migrate some tests to the new htmlRunner
Fix events.get_timeStamp (was events.get_timestamp, wrong casing). Rename `newRunner` to `htmlRunner`. move tests to src/tests (from src/browser/tests). src/runtime and possibly other parts might want to have html tests too.
This commit is contained in:
@@ -506,7 +506,7 @@ pub fn shutdown() void {
|
||||
test_app.deinit();
|
||||
}
|
||||
|
||||
pub fn newRunner(file: []const u8) !void {
|
||||
pub fn htmlRunner(file: []const u8) !void {
|
||||
defer _ = arena_instance.reset(.retain_capacity);
|
||||
const page = try test_session.createPage();
|
||||
defer test_session.removePage();
|
||||
@@ -516,7 +516,7 @@ pub fn newRunner(file: []const u8) !void {
|
||||
try_catch.init(js_context);
|
||||
defer try_catch.deinit();
|
||||
|
||||
const url = try std.fmt.allocPrint(arena_allocator, "http://localhost:9582/src/browser/tests/{s}", .{file});
|
||||
const url = try std.fmt.allocPrint(arena_allocator, "http://localhost:9582/src/tests/{s}", .{file});
|
||||
try page.navigate(url, .{});
|
||||
page.wait(2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user