Move the tests from scripts/ to tests/ by feature
Unit tests go to tests/unit/<area>/, browser smoke tests to tests/smoke/<area>/, and tests against a running desktop app to tests/native/. Files named after dates, work passes, or Kanban cards get feature names, for example editorOctober12 -> editor/footnotes. scripts/ keeps the build, release, and package tools. Plugin repositories import scripts/packagePlugin.mjs, and the Terminal smoke test imports scripts/pluginMocks.mjs, which now re-exports the harness copy. The unit tests get their own type check (tests/tsconfig.json) with Node types. pnpm check runs it after the app check. Add @types/node and fix the three test mocks that it reported.
This commit is contained in:
+13
-1
@@ -11,7 +11,19 @@
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"moduleResolution": "bundler"
|
||||
}
|
||||
},
|
||||
// The app check leaves out tests/. They run in Node and have their own tests/tsconfig.json.
|
||||
// These entries copy the SvelteKit excludes, which TypeScript does not merge.
|
||||
"exclude": [
|
||||
"node_modules/**",
|
||||
"src/service-worker.js",
|
||||
"src/service-worker/**/*.js",
|
||||
"src/service-worker.ts",
|
||||
"src/service-worker/**/*.ts",
|
||||
"src/service-worker.d.ts",
|
||||
"src/service-worker/**/*.d.ts",
|
||||
"tests/**"
|
||||
]
|
||||
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
|
||||
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user