From 73aaa790da2c66d9f3bbc3fd059246fc6ad5b63d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 7 Jun 2024 17:43:53 +0300 Subject: [PATCH] Map the browser import path to the sync API The k6 browser API is now Async. To continue to work with the sync API, k6-core needs to be updated to browser.NewSync. This method maps the browser's core API to sync methods. --- js/jsmodules.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jsmodules.go b/js/jsmodules.go index a340600eb16..fe7913b739c 100644 --- a/js/jsmodules.go +++ b/js/jsmodules.go @@ -46,7 +46,7 @@ func getInternalJSModules() map[string]interface{} { "k6/experimental/timers is now part of the k6 core, please change your imports to use k6/timers instead."+ " The k6/experimental/timers will be removed in k6 v0.52.0"), "k6/experimental/tracing": tracing.New(), - "k6/experimental/browser": browser.New(), + "k6/experimental/browser": browser.NewSync(), "k6/experimental/fs": fs.New(), "k6/net/grpc": grpc.New(), "k6/html": html.New(),