@appthrust/kest 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/biome/recommended.json +10 -0
- package/package.json +4 -2
- package/ts/test.ts +5 -6
package/README.md
CHANGED
|
@@ -1180,6 +1180,26 @@ KEST_PRESERVE_ON_FAILURE=1 bun test
|
|
|
1180
1180
|
|
|
1181
1181
|
When active, Kest skips cleanup for failed scenarios so you can inspect the cluster with `kubectl`. The test report will show a "Cleanup (skipped)" notice instead of the usual cleanup table. Remember to delete the leftover resources manually once you're done investigating.
|
|
1182
1182
|
|
|
1183
|
+
### Biome configuration
|
|
1184
|
+
|
|
1185
|
+
If you use [Biome](https://biomejs.dev/) for linting, the `noDoneCallback` rule may flag kest's `test` callback parameter as a false positive. The parameter is a `Scenario` object, not a done callback.
|
|
1186
|
+
|
|
1187
|
+
To suppress this, extend kest's shareable Biome config in your `biome.json`:
|
|
1188
|
+
|
|
1189
|
+
```json
|
|
1190
|
+
{
|
|
1191
|
+
"extends": ["@appthrust/kest/biome/recommended.json"]
|
|
1192
|
+
}
|
|
1193
|
+
```
|
|
1194
|
+
|
|
1195
|
+
This disables `lint/style/noDoneCallback` while leaving all other rules untouched. If you already extend another config, add kest's config after it:
|
|
1196
|
+
|
|
1197
|
+
```json
|
|
1198
|
+
{
|
|
1199
|
+
"extends": ["@suin/biome.json", "@appthrust/kest/biome/recommended.json"]
|
|
1200
|
+
}
|
|
1201
|
+
```
|
|
1202
|
+
|
|
1183
1203
|
## Environment Variables
|
|
1184
1204
|
|
|
1185
1205
|
| Variable | Description |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appthrust/kest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Kubernetes E2E testing framework designed for humans and AI alike",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "ts/index.ts",
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
".": {
|
|
9
9
|
"types": "./ts/index.ts",
|
|
10
10
|
"default": "./ts/index.ts"
|
|
11
|
-
}
|
|
11
|
+
},
|
|
12
|
+
"./biome/recommended.json": "./biome/recommended.json"
|
|
12
13
|
},
|
|
13
14
|
"files": [
|
|
14
15
|
"ts/**/*.ts",
|
|
15
16
|
"!ts/**/*.test.ts",
|
|
17
|
+
"biome/",
|
|
16
18
|
"example/",
|
|
17
19
|
"LICENSE",
|
|
18
20
|
"README.md"
|
package/ts/test.ts
CHANGED
|
@@ -17,8 +17,7 @@ interface TestOptions {
|
|
|
17
17
|
timeout?: string;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
setDefaultTimeout(defaultTimeout);
|
|
20
|
+
setDefaultTimeout(60_000);
|
|
22
21
|
|
|
23
22
|
type Callback = (scenario: Scenario) => Promise<unknown>;
|
|
24
23
|
|
|
@@ -98,12 +97,12 @@ function makeScenarioTest(runner: BunTestRunner): TestFunction {
|
|
|
98
97
|
function convertTestOptions(
|
|
99
98
|
options?: undefined | TestOptions
|
|
100
99
|
): undefined | BunTestOptions {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
if (!options?.timeout) {
|
|
101
|
+
return undefined;
|
|
102
|
+
}
|
|
104
103
|
return {
|
|
105
104
|
...options,
|
|
106
|
-
timeout,
|
|
105
|
+
timeout: parseDuration(options.timeout).toMilliseconds(),
|
|
107
106
|
};
|
|
108
107
|
}
|
|
109
108
|
|