Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Mihail Stoykov <[email protected]>
  • Loading branch information
olegbespalov and mstoykov committed Jun 14, 2022
1 parent 8c87090 commit 822c34c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/modules/k6/execution/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (mi *ModuleInstance) Exports() modules.Exports {
return modules.Exports{Default: mi.obj}
}

var errRunInInitContext = errors.New("getting scenario information in the init context is not supported")
var errRunInInitContext = errors.New("getting scenario information outside of vu code is not supported")

// newScenarioInfo returns a goja.Object with property accessors to retrieve
// information about the scenario the current VU is running in.
Expand Down
2 changes: 1 addition & 1 deletion js/modules/k6/execution/execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,6 @@ func TestScenarioNoAvailableInInitContext(t *testing.T) {
prop := fmt.Sprintf("exec.scenario.%s", code)
_, err := rt.RunString(prop)
require.Error(t, err)
require.ErrorContains(t, err, "getting scenario information in the init context is not supported")
require.ErrorContains(t, err, "getting scenario information outside of vu code is not supported")
}
}
2 changes: 1 addition & 1 deletion js/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2406,7 +2406,7 @@ func TestExecutionInfo(t *testing.T) {
{name: "scenario_err", script: `
var exec = require('k6/execution');
exec.scenario;
`, expErr: "getting scenario information in the init context is not supported"},
`, expErr: "getting scenario information outside of vu code is not supported"},
{name: "test_ok", script: `
var exec = require('k6/execution');
Expand Down

0 comments on commit 822c34c

Please sign in to comment.