Hello,
Saw great opportunity to use describe blocks within K6.
As I am trying to use k6 on a server, I cant be importing it from https:// as in example, I would rather have it locally in codebase.
However If I try to add chaijs directory from github (GitHub - grafana/k6-jslib-k6chaijs: Chai Assertion Library for k6.io) to mine I get errors which I cant really resolve.
Steps I did:
I tried downloading codebase for chaijs as zip and adding to my workspace and then importing describe block from directory.
Perhaps anyone already has solution for that ?
When I run k6 after importing describe block I get error like this:
5 | * Handle assertion grouping the K6 way
6 | */
> 7 | export function describe(name: string, fn: (...xs: unknown[]) => unknown) {
| ^
8 | let success = true;
9 |
10 | group(name, () => {
at <internal/k6/compiler/lib/babel.min.js>:2:28536(105)
at <internal/k6/compiler/lib/babel.min.js>:14:24413(12)
at bound (native)
at s (<internal/k6/compiler/lib/babel.min.js>:1:1331(8))
at native hint="script exception"