Skip to content

Commit

Permalink
Add test for browser multi close warning
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed Mar 3, 2023
1 parent cc22a84 commit d51fd9f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/browser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,13 @@ func TestMultiBrowserPanic(t *testing.T) {
err = p2.Signal(syscall.Signal(0))
assert.Error(t, err, "process #2 should be dead, but exists")
}

func TestBrowserMultiClose(t *testing.T) {
t.Parallel()

tb := newTestBrowser(t, withSkipClose(), withLogCache())

require.NotPanicsf(t, tb.Close, "first call to browser.close should not panic")
require.NotPanicsf(t, tb.Close, "second call to browser.close should not panic")
tb.logCache.assertContains(t, "browser.close only once")
}

0 comments on commit d51fd9f

Please sign in to comment.