Skip to content

Commit 841ea5c

Browse files
oleiadeankur22
authored andcommitted
refactor: automate specific testing library version references
1 parent ec89987 commit 841ea5c

File tree

13 files changed

+21
-21
lines changed

13 files changed

+21
-21
lines changed

docs/sources/k6/next/javascript-api/k6-browser/locator/count.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Returns the number of elements matching the selector. This does not wait for act
1818
{{< code >}}
1919

2020
```javascript
21-
import { expect } from 'https://jslib.k6.io/k6-testing/0.4.0/index.js';
21+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
2222
import { browser } from 'k6/browser';
2323

2424
export const options = {

docs/sources/k6/next/javascript-api/k6-browser/locator/first.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Returns a [Locator](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-b
1818
{{< code >}}
1919

2020
```javascript
21-
import { expect } from 'https://jslib.k6.io/k6-testing/0.4.0/index.js';
21+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
2222
import { browser } from 'k6/browser';
2323

2424
export const options = {

docs/sources/k6/next/javascript-api/k6-browser/locator/last.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Returns a [Locator](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-b
1818
{{< code >}}
1919

2020
```javascript
21-
import { expect } from 'https://jslib.k6.io/k6-testing/0.4.0/index.js';
21+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
2222
import { browser } from 'k6/browser';
2323

2424
export const options = {

docs/sources/k6/next/javascript-api/k6-browser/locator/nth.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Returns a [Locator](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-b
1818
{{< code >}}
1919

2020
```javascript
21-
import { expect } from 'https://jslib.k6.io/k6-testing/0.4.0/index.js';
21+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
2222
import { browser } from 'k6/browser';
2323

2424
export const options = {

docs/sources/k6/next/release-notes/v0.57.0.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Unlike current k6's `check` when `expects` assertions fail, the test will immedi
3535
[There are many generic matchers](https://github.com/grafana/k6-jslib-testing?tab=readme-ov-file#3-standard-assertions) (and more to come), such as `toEqual`, `toBe`, or `toBeTruthy`, to only name a few, that can be used to assert conditions during a k6 test.
3636

3737
```javascript
38-
import { expect } from 'https://jslib.k6.io/k6-testing/0.2.0/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.k6.io');
@@ -48,7 +48,7 @@ export default function () {
4848
[k6-jslib-testing](https://github.com/grafana/k6-jslib-testing) also includes browser-specific async matchers that wait until the expected condition is met such as `toBeVisible`, `toBeDisabled`, or `toBeChecked`, to name a few.
4949

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

5454
export const options = {
@@ -89,7 +89,7 @@ export default async function () {
8989
It is currently available as part of the [jslib.k6.io](https://jslib.k6.io) repository and is available to use in your k6 tests by adding the following import:
9090

9191
```javascript
92-
import { expect } from 'https://jslib.k6.io/k6-testing/0.2.0/index.js';
92+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
9393
```
9494

9595
Try it out and give us feedback or contribute to the project on the [k6-jslib-testing repository](https://github.com/grafana/k6-jslib-testing)!

docs/sources/k6/next/using-k6/assertions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default function () {
111111
[Auto-retrying assertions](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/retrying-assertions) automatically retry until conditions become true or a timeout is reached. They're designed for [browser testing](https://grafana.com/docs/k6/<K6_VERSION>/using-k6-browser) scenarios where elements may take time to load, update, or become interactable.
112112

113113
```javascript
114-
import { expect } from 'https://jslib.k6.io/k6-testing/0.5.0/index.js';
114+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
115115
import { browser } from 'k6/browser';
116116

117117
export default async function() {

docs/sources/k6/v0.57.x/release-notes/v0.57.0.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Unlike current k6's `check` when `expects` assertions fail, the test will immedi
3535
[There are many generic matchers](https://github.com/grafana/k6-jslib-testing?tab=readme-ov-file#3-standard-assertions) (and more to come), such as `toEqual`, `toBe`, or `toBeTruthy`, to only name a few, that can be used to assert conditions during a k6 test.
3636

3737
```javascript
38-
import { expect } from 'https://jslib.k6.io/k6-testing/0.2.0/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.k6.io');
@@ -48,7 +48,7 @@ export default function () {
4848
[k6-jslib-testing](https://github.com/grafana/k6-jslib-testing) also includes browser-specific async matchers that wait until the expected condition is met such as `toBeVisible`, `toBeDisabled`, or `toBeChecked`, to name a few.
4949

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

5454
export const options = {
@@ -89,7 +89,7 @@ export default async function () {
8989
It is currently available as part of the [jslib.k6.io](https://jslib.k6.io) repository and is available to use in your k6 tests by adding the following import:
9090

9191
```javascript
92-
import { expect } from 'https://jslib.k6.io/k6-testing/0.2.0/index.js';
92+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
9393
```
9494

9595
Try it out and give us feedback or contribute to the project on the [k6-jslib-testing repository](https://github.com/grafana/k6-jslib-testing)!

docs/sources/k6/v1.0.x/release-notes/v0.57.0.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Unlike current k6's `check` when `expects` assertions fail, the test will immedi
3535
[There are many generic matchers](https://github.com/grafana/k6-jslib-testing?tab=readme-ov-file#3-standard-assertions) (and more to come), such as `toEqual`, `toBe`, or `toBeTruthy`, to only name a few, that can be used to assert conditions during a k6 test.
3636

3737
```javascript
38-
import { expect } from 'https://jslib.k6.io/k6-testing/0.2.0/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.k6.io');
@@ -48,7 +48,7 @@ export default function () {
4848
[k6-jslib-testing](https://github.com/grafana/k6-jslib-testing) also includes browser-specific async matchers that wait until the expected condition is met such as `toBeVisible`, `toBeDisabled`, or `toBeChecked`, to name a few.
4949

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

5454
export const options = {
@@ -89,7 +89,7 @@ export default async function () {
8989
It is currently available as part of the [jslib.k6.io](https://jslib.k6.io) repository and is available to use in your k6 tests by adding the following import:
9090

9191
```javascript
92-
import { expect } from 'https://jslib.k6.io/k6-testing/0.2.0/index.js';
92+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
9393
```
9494

9595
Try it out and give us feedback or contribute to the project on the [k6-jslib-testing repository](https://github.com/grafana/k6-jslib-testing)!

docs/sources/k6/v1.1.x/javascript-api/k6-browser/locator/count.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Returns the number of elements matching the selector. This does not wait for act
1818
{{< code >}}
1919

2020
```javascript
21-
import { expect } from 'https://jslib.k6.io/k6-testing/0.4.0/index.js';
21+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
2222
import { browser } from 'k6/browser';
2323

2424
export const options = {

docs/sources/k6/v1.1.x/javascript-api/k6-browser/locator/first.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Returns a [Locator](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-b
1818
{{< code >}}
1919

2020
```javascript
21-
import { expect } from 'https://jslib.k6.io/k6-testing/0.4.0/index.js';
21+
import { expect } from 'https://jslib.k6.io/k6-testing/{{< param "JSLIB_TESTING_VERSION" >}}/index.js';
2222
import { browser } from 'k6/browser';
2323

2424
export const options = {

0 commit comments

Comments
 (0)