From 30f9300a49384d01a1ceddf391385b6176340d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Tue, 4 Jun 2024 12:39:17 +0300 Subject: [PATCH] Async JSHandle.jsonValue --- browser/js_handle_mapping.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/browser/js_handle_mapping.go b/browser/js_handle_mapping.go index 824e381b6..af13b58b0 100644 --- a/browser/js_handle_mapping.go +++ b/browser/js_handle_mapping.go @@ -50,6 +50,10 @@ func mapJSHandle(vu moduleVU, jsh common.JSHandleAPI) mapping { return dst, nil }) }, - "jsonValue": jsh.JSONValue, + "jsonValue": func() *goja.Promise { + return k6ext.Promise(vu.Context(), func() (any, error) { + return jsh.JSONValue() //nolint:wrapcheck + }) + }, } }