Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjusts recommendations for check #4043

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions js/modules/k6/k6.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (mi *K6) Group(name string, val sobek.Value) (sobek.Value, error) {
}
if common.IsAsyncFunction(mi.vu.Runtime(), val) {
return sobek.Undefined(), errors.New("group() does not support async functions as arguments, " +
"please see https://grafana.com/docs/k6/latest/javascript-api/k6/group/#working-with-async-functions for more info")
"please see https://grafana.com/docs/k6/latest/javascript-api/k6/group/ for more info")
}
oldGroupName, _ := state.Tags.GetCurrentValues().Tags.Get(metrics.TagGroup.String())
// TODO: what are we doing if group is not tagged
Expand Down Expand Up @@ -179,9 +179,9 @@ func (mi *K6) Check(arg0, checks sobek.Value, extras ...sobek.Value) (bool, erro
}

if common.IsAsyncFunction(rt, val) {
return false, errors.New("built-in check() does not support async functions as arguments, " +
"please switch to JavaScript replacement, see " +
"https://grafana.com/docs/k6/latest/javascript-api/jslib/utils/check/ for more info")
return false, errors.New("the built-in check() does not support async functions as arguments. " +
"Use the JavaScript utils library as a replacement. " +
"Refer to https://grafana.com/docs/k6/latest/javascript-api/jslib/utils/check/ for more info")
}

// Resolve callables into values.
Expand Down
Loading