From 4c8fae0226f2d42d0ac4b3c4b1520f4c59939b0d Mon Sep 17 00:00:00 2001 From: Kegan Dougal <7190048+kegsay@users.noreply.github.com> Date: Mon, 4 Mar 2024 11:24:30 +0000 Subject: [PATCH] bugfix: don't risk logging in finished tests --- internal/api/js/js.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/js/js.go b/internal/api/js/js.go index 34de36a..3b98831 100644 --- a/internal/api/js/js.go +++ b/internal/api/js/js.go @@ -447,8 +447,8 @@ func (c *JSClient) Logf(t ct.TestLike, format string, args ...interface{}) { formatted := fmt.Sprintf(t.Name()+": "+format, args...) if c.browser.Ctx.Err() == nil { // don't log on dead browsers chrome.MustRunAsyncFn[chrome.Void](t, c.browser.Ctx, fmt.Sprintf(`console.log("%s");`, strings.Replace(formatted, `"`, `\"`, -1))) + t.Logf(format, args...) } - t.Logf(format, args...) } func (c *JSClient) Type() api.ClientTypeLang {