Skip to content

Commit

Permalink
Add opts to startIteration
Browse files Browse the repository at this point in the history
This will allow callers to pass the NewVU opts, e.g. to set env vars.
  • Loading branch information
ankur22 committed Mar 5, 2024
1 parent 3fed181 commit 92b0d0d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/page_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -822,10 +822,11 @@ func TestPageWaitForFunction(t *testing.T) {
// (more importantly) set browser as the mapped browser instance which will
// force all tests that work with this to go through the mapping layer.
// This returns a cleanup function which should be deferred.
func startIteration(t *testing.T) (*k6test.VU, *goja.Runtime, *[]string, func()) {
// The opts are passed to k6test.NewVU as is without any modification.
func startIteration(t *testing.T, opts ...any) (*k6test.VU, *goja.Runtime, *[]string, func()) {
t.Helper()

vu := k6test.NewVU(t)
vu := k6test.NewVU(t, opts...)
rt := vu.Runtime()

mod := browser.New().NewModuleInstance(vu)
Expand Down

0 comments on commit 92b0d0d

Please sign in to comment.