-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbunfig.toml
More file actions
70 lines (64 loc) · 2.9 KB
/
Copy pathbunfig.toml
File metadata and controls
70 lines (64 loc) · 2.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
[test]
preload = ["./test/ensure-deps.js", "./test/setup.js"]
# Test file patterns
root = "./test"
# Parallel execution (default behavior in Bun)
# Bun automatically runs tests in parallel
# Timeout for individual tests (1.5 seconds)
timeout = 1500
# Coverage is NOT enabled by default - only the full test suite (bun run test)
# passes --coverage explicitly. This prevents ad-hoc test runs (bun test:unit,
# bun test test/some-file) from failing with exit code 1 due to coverage
# thresholds when all tests actually pass.
# Coverage thresholds - enforced only when --coverage flag is passed
# Full 100% coverage required for both lines and functions
coverageThreshold = { lines = 1.0, functions = 1.0 }
# Files excluded from coverage:
# - ensure-deps.js: defensive code that can't be meaningfully tested
# - validated-config.js: module-load-time validation that can only fail if config files are misconfigured
# - customise-cms/*: CLI scripts with hard-to-test file system operations
# - cli-io.js: I/O functions that read process.argv and call process.exit
# - pdf.js, image.js, image-crop.js, image-external.js: error handling for external library edge cases
# - console.js: console output utilities
# - test-runner-utils.js, test-utils.js: test infrastructure
# - recurring-events.js: date edge cases
# - cart-utils.js, quote-price-utils.js: browser-specific edge cases
# - array-utils.js: some utility functions only used in specific contexts
# - on-ready.js: document.readyState branch requires complex mocking
# - search.js: dynamic import("/pagefind/pagefind.js") only resolves against built site
# - screenshot.js, screenshots.js, lighthouse.js, browser-utils.js: Playwright/Chrome browser automation
# - configure-filters.js: Eleventy registration wiring (functions it calls are fully tested)
coveragePathIgnorePatterns = [
".cache/*",
"src/_lib/filters/configure-filters.js",
"test/ensure-deps.js",
"src/_lib/config/validated-config.js",
"src/_lib/public/utils/on-ready.js",
"src/_lib/public/ui/decrypt-text.js",
"src/_lib/public/ui/category-filter.js",
"src/_lib/public/ui/search.js",
"scripts/mutation.js",
"scripts/mutation/runner.js",
"test/precommit/colors.js",
"scripts/customise-cms/cli-io.js",
"scripts/customise-cms/config.js",
"scripts/customise-cms/fields.js",
"scripts/customise-cms/generator.js",
"src/_lib/eleventy/pdf.js",
"src/_lib/eleventy/recurring-events.js",
"src/_lib/media/image.js",
"src/_lib/media/image-crop.js",
"src/_lib/media/image-external.js",
"src/_lib/public/utils/cart-utils.js",
"src/_lib/public/utils/notify.js",
"src/_lib/utils/format-price.js",
"src/_lib/public/utils/quote-price-utils.js",
"src/_lib/utils/console.js",
"test/test-runner-utils.js",
"test/test-utils.js",
"test/unit/code-quality/code-quality-utils.js",
"src/_lib/eleventy/screenshots.js",
"src/_lib/media/screenshot.js",
"src/_lib/media/browser-utils.js",
"src/_lib/media/lighthouse.js",
]