Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ pnpm verify:changed # verify:static && test:ut:changed && test:docs; what pre-

Run one layer with `pnpm vitest run src/domain`, one file with `pnpm vitest run src/domain/forecast.test.ts`.

[`vitest.config.mts`](./vitest.config.mts) sets `experimental.traceTimeline`, so a failing test prints the timeline
of the waits it ran (each `vi.waitFor`, `vi.waitUntil` and `expect.poll`, by its `message`, and how long it took),
and `fakeTimers.fakeNodeBuiltins`, so `vi.useFakeTimers()` fakes the `node:timers` modules as well as the globals,
which Vitest's next major does by default.

`test:ut:changed` picks tests through the import graph, which no Markdown file is in, which is why `verify:changed`
ends with `test:docs`.

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@
"@semantic-release/release-notes-generator": "14.1.1",
"@types/js-yaml": "4.0.9",
"@types/node": "26.6.5",
"@vitest/coverage-v8": "5.0.5",
"@vitest/coverage-v8": "5.1.0",
"esbuild": "0.28.2",
"husky": "9.1.7",
"lint-staged": "17.6.0",
"semantic-release": "25.0.9",
"typescript": "7.0.2",
"vitest": "5.0.5"
"vitest": "5.1.0"
}
}
72 changes: 36 additions & 36 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export default defineConfig({
reporters: process.env.GITHUB_ACTIONS ? ["default", jobSummary(suitesRun)] : ["default"],
globals: true,
testTimeout: 20_000,
experimental: { traceTimeline: true },
fakeTimers: { fakeNodeBuiltins: true },
coverage: {
provider: "v8",
reporter: ["text", "lcov"],
Expand Down
Loading