Skip to content

Commit

Permalink
Adjusts recommendations for check
Browse files Browse the repository at this point in the history
  • Loading branch information
olegbespalov committed Nov 8, 2024
1 parent a40d853 commit 0411e28
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 0411e28

Please sign in to comment.