You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/runtime/bunfig.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -284,6 +284,46 @@ junit = "test-results.xml"
284
284
285
285
This generates a JUnit XML report that can be consumed by CI systems and other tools.
286
286
287
+
### `test.randomize`
288
+
289
+
Run tests in random order. Default `false`.
290
+
291
+
```toml
292
+
[test]
293
+
randomize = true
294
+
```
295
+
296
+
This helps catch bugs related to test interdependencies by running tests in a different order each time. When combined with `seed`, the random order becomes reproducible.
297
+
298
+
The `--randomize` CLI flag will override this setting when specified.
299
+
300
+
### `test.seed`
301
+
302
+
Set the random seed for test randomization. This option requires `randomize` to be `true`.
303
+
304
+
```toml
305
+
[test]
306
+
randomize = true
307
+
seed = 2444615283
308
+
```
309
+
310
+
Using a seed makes the randomized test order reproducible across runs, which is useful for debugging flaky tests. When you encounter a test failure with randomization enabled, you can use the same seed to reproduce the exact test order.
311
+
312
+
The `--seed` CLI flag will override this setting when specified.
313
+
314
+
### `test.rerunEach`
315
+
316
+
Re-run each test file a specified number of times. Default `0` (run once).
317
+
318
+
```toml
319
+
[test]
320
+
rerunEach = 3
321
+
```
322
+
323
+
This is useful for catching flaky tests or non-deterministic behavior. Each test file will be executed the specified number of times.
324
+
325
+
The `--rerun-each` CLI flag will override this setting when specified.
326
+
287
327
## Package manager
288
328
289
329
Package management is a complex issue; to support a range of use cases, the behavior of `bun install` can be configured under the `[install]` section.
if (decompressed_size==std.math.maxInt(c_ulonglong) -1ordecompressed_size==std.math.maxInt(c_ulonglong) -2) {
1844
-
// If size is unknown, we'll need to decompress in chunks
1845
-
returnglobalThis.ERR(.ZSTD, "Decompressed size is unknown. Either the input is not a valid zstd compressed buffer or the decompressed size is too large. If you run into this error with a valid input, please file an issue at https://github.com/oven-sh/bun/issues", .{}).throw();
1846
-
}
1847
-
1848
-
// Allocate output buffer based on decompressed size
0 commit comments