Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit e2a9d28

Browse files
committed
Add browser launch options nil test
1 parent 4e48ccc commit e2a9d28

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

common/browser_options_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ func TestBrowserLaunchOptionsParse(t *testing.T) {
3232
}, lo)
3333
},
3434
},
35+
"defaults_nil": { // providing nil option returns default options
36+
opts: nil,
37+
assert: func(tb testing.TB, lo *LaunchOptions) {
38+
tb.Helper()
39+
assert.Equal(t, &LaunchOptions{
40+
Env: make(map[string]string),
41+
Headless: true,
42+
LogCategoryFilter: ".*",
43+
Timeout: DefaultTimeout,
44+
}, lo)
45+
},
46+
},
3547
"defaults_on_cloud": {
3648
onCloud: true,
3749
opts: map[string]any{

0 commit comments

Comments
 (0)