useSimStore is the one reactive module singleton from the spec: panels over a shared base config, runs debounced 400 ms, one POST /api/scenario per panel in parallel, results swapped in atomically only when every request succeeds. Failures keep the last good results; engine 400s are routed to an inline validationError, everything else to the banner message. Stale in-flight responses lose to newer runs per panel. URL state follows spec section 7 (readable params, repeated panel=, focus index, full fallback to the preset on any malformed part) and is covered by round-trip and rejection tests. The study copy and initial panels live in the deepfake-school preset module; formatPct is the single percent-rounding rule. The vitest tsconfig now keeps lib at ES2022 like the app config, and prettier skips the tygo-generated src/types (drift guard stays green).
21 lines
840 B
JSON
21 lines
840 B
JSON
{
|
|
"extends": "./tsconfig.app.json",
|
|
|
|
// Override to include only test files and clear exclusions.
|
|
// Application code imported in tests is automatically included via module resolution.
|
|
"include": ["src/**/__tests__/*", "env.d.ts"],
|
|
"exclude": [],
|
|
|
|
"compilerOptions": {
|
|
// Vitest runs in a different environment than the application code.
|
|
// Adjust lib and types accordingly. The language lib stays ES2022 (as in
|
|
// the app config) so app code imported by tests type-checks the same;
|
|
// only the DOM globals come from jsdom instead.
|
|
"lib": ["ES2022"],
|
|
"types": ["node", "jsdom"],
|
|
|
|
// `vue-tsc --build` produces a .tsbuildinfo file for incremental type-checking.
|
|
// Specified here to keep it out of the root directory.
|
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo"
|
|
}
|
|
}
|