From 0411e284d8e229788f9699c55ee07df9aa07e26c Mon Sep 17 00:00:00 2001 From: Oleg Bespalov Date: Fri, 8 Nov 2024 08:18:40 +0100 Subject: [PATCH] Adjusts recommendations for check --- js/modules/k6/k6.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/modules/k6/k6.go b/js/modules/k6/k6.go index 178536471cf..822c25ec4be 100644 --- a/js/modules/k6/k6.go +++ b/js/modules/k6/k6.go @@ -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 @@ -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.