Skip to content

Commit 8b016e2

Browse files
authored
Thresholds.md javascript codeblocks adds (#1274)
* Thresholds.md javascript codeblocks adds * Update 04 Thresholds.md
1 parent f0688ae commit 8b016e2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/data/markdown/translated-guides/en/02 Using k6/04 Thresholds.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,18 @@ and k6 would exit with a non-zero exit code.
7575
To use a threshold, follow these steps:
7676
7777
1. In the `thresholds` property of the `options` object, set a key using the name of the metric you want the threshold for:
78-
```
78+
```javascript
7979
export const options = {
8080
thresholds: {
81-
...
81+
/* ... */
82+
}
8283
}
8384
```
8485
2. Define at least one threshold expression. You can do this in two ways:
8586
- The short format puts all threshold expressions as strings in an array.
8687
- The long format puts each threshold in an object, with extra properties to [abort on failure](#abort).
8788
88-
```
89+
```javascript
8990
export const options = {
9091
thresholds: {
9192
//short format

0 commit comments

Comments
 (0)