Skip to content

Commit

Permalink
bugfix: don't risk logging in finished tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed Mar 4, 2024
1 parent 21d682d commit 4c8fae0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/js/js.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4c8fae0

Please sign in to comment.