mirror of
https://github.com/AventurasTeam/Aventuras.git
synced 2026-08-23 07:53:19 +00:00
- **New Features** - Added duplicate-entity review, merge previews, and “keep separate” decisions for characters, locations, items, and lore entries. - Added manual lore-management controls, progress summaries, and safeguards against concurrent runs. - Added shared chapter-query limits and caching. - **Bug Fixes** - Prevented manual chapter creation during active background work. - Improved name matching, duplicate handling, and lore-field cleanup. - Migrated context settings while preserving existing preferences. - **Documentation** - Streamlined the product overview, setup instructions, development guidance, and technology information.
15 lines
932 B
Markdown
15 lines
932 B
Markdown
# Testing
|
|
|
|
Vitest (`vitest.config.ts`), covering targeted units under `src/lib/` — not a full-coverage suite. Run
|
|
with `npm test`.
|
|
|
|
**Rune modules cannot be imported by tests.** `vitest.config.ts` deliberately omits the SvelteKit plugin
|
|
to keep the suite fast and stable, so any `*.svelte.ts` file fails at import with `$state is not defined`.
|
|
Services reach the stores through `vi.mock('$lib/stores/…')`; logic that needs testing on its own is
|
|
extracted into a plain `.ts` module instead (`settingsMigrations.ts`, `advancedPanelView.ts`,
|
|
`stickiness.ts`, `recentTail.ts` are all this pattern). Those modules are production code with real
|
|
callers, not test scaffolding.
|
|
|
|
There is also no DOM environment (`environment: 'node'`), so components are not rendered by any test. A
|
|
Svelte-level mistake — a `bind:` to an undefined value, for instance — passes `check`, `lint` and the
|
|
whole suite, and only fails when the app runs.
|