Skip to content

Commit 2adaa5f

Browse files
oleiadeankur22
authored andcommitted
fix: wrong jslib version used
1 parent fde0afc commit 2adaa5f

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

docs/sources/k6/next/javascript-api/jslib/testing/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_
3535
```javascript
3636
import { check } from 'k6';
3737
import http from 'k6/http';
38-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
38+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
3939

4040
export default function () {
4141
const response = http.get('https://test-api.k6.io/public/crocodiles/1/');
@@ -55,7 +55,7 @@ export default function () {
5555

5656
```javascript
5757
import { browser } from 'k6/experimental/browser';
58-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
58+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
5959

6060
export default async function () {
6161
const page = browser.newPage();
@@ -73,7 +73,7 @@ export default async function () {
7373
Create configured `expect` instances for custom behavior:
7474

7575
```javascript
76-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
76+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
7777

7878
// Create configured expect instance
7979
const myExpect = expect.configure({

docs/sources/k6/next/javascript-api/jslib/testing/configure.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const slowExpect = expect.configure({
6060
The `display` and `colorize` options control how assertion failures are reported:
6161

6262
```javascript
63-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
63+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
6464

6565
// Create expect instance with inline output and no colors
6666
const inlineExpect = expect.configure({
@@ -74,7 +74,7 @@ const inlineExpect = expect.configure({
7474
The `softMode` option controls whether failed assertions stop test execution:
7575

7676
```javascript
77-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
77+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
7878

7979
// The default behavior of soft assertions is mark the test as failed, the `softMode` option
8080
// allows to configure soft assertions to throw an exception and fail the current iteration instead.
@@ -107,7 +107,7 @@ k6 run test.js
107107
### Basic Configuration
108108

109109
```javascript
110-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
110+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
111111

112112
// Create a configured expect instance
113113
const myExpect = expect.configure({
@@ -130,7 +130,7 @@ export default function () {
130130

131131
```javascript
132132
import { browser } from 'k6/experimental/browser';
133-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
133+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
134134

135135
// Create expect instance configured for browser testing with longer timeouts
136136
const browserExpect = expect.configure({
@@ -150,7 +150,7 @@ export default async function () {
150150
### CI/CD Configuration
151151

152152
```javascript
153-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
153+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
154154

155155
// Create expect instance configured for CI environment
156156
const ciExpect = expect.configure({
@@ -163,7 +163,7 @@ const ciExpect = expect.configure({
163163
### Development vs Production
164164

165165
```javascript
166-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
166+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
167167

168168
// Different configuration based on environment
169169
const isDevelopment = __ENV.NODE_ENV === 'development';
@@ -179,7 +179,7 @@ const envExpect = expect.configure({
179179
### Multiple Configured Instances
180180

181181
```javascript
182-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
182+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
183183

184184
export default function () {
185185
// Create specific expect instances for different scenarios
@@ -206,7 +206,7 @@ export default function () {
206206

207207
```javascript
208208
import http from 'k6/http';
209-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
209+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
210210

211211
// Create expect instance with soft assertions enabled
212212
const softExpect = expect.configure({

docs/sources/k6/next/javascript-api/jslib/testing/expect.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The `expect()` function wraps a value and returns an expectation object that pro
3737
Standard assertions evaluate immediately and do not retry:
3838

3939
```javascript
40-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
40+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
4141

4242
expect(42).toBe(42);
4343
expect([1, 2, 3]).toContain(2);
@@ -49,7 +49,7 @@ Retrying assertions automatically retry until they pass or timeout. These are pa
4949

5050
```javascript
5151
import { browser } from 'k6/experimental/browser';
52-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
52+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
5353

5454
export default async function () {
5555
const page = browser.newPage();
@@ -66,7 +66,7 @@ export default async function () {
6666
All assertions can be negated using the `.not` property:
6767

6868
```javascript
69-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
69+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
7070

7171
expect(42).not.toBe(43);
7272
expect('hello').not.toContain('world');
@@ -78,7 +78,7 @@ By default, failed assertions will terminate the test execution. Soft assertions
7878

7979
```javascript
8080
import exec from "k6/execution";
81-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
81+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
8282

8383
export const options = {
8484
vus: 2,
@@ -98,7 +98,7 @@ export default function () {
9898
Note that soft assertions can be [configured](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/configure) to throw an exception (and effectively failing the iteration where it happens) instead.
9999

100100
```javascript
101-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
101+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
102102

103103
// Configure soft mode globally
104104
expect.configure({ softMode: 'continue' });
@@ -116,7 +116,7 @@ export default function () {
116116

117117
```javascript
118118
import http from 'k6/http';
119-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
119+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
120120

121121
export default function () {
122122
const response = http.get('https://test-api.k6.io/public/crocodiles/1/');
@@ -140,7 +140,7 @@ export default function () {
140140

141141
```javascript
142142
import { browser } from 'k6/experimental/browser';
143-
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_AWS_VERSION" >}}/index.js';
143+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
144144

145145
export default async function () {
146146
const page = browser.newPage();

0 commit comments

Comments
 (0)