From 3b8141215ce136940525daa391ed3f891ad34e3f Mon Sep 17 00:00:00 2001 From: IVA2K Date: Sat, 10 Feb 2024 08:22:30 -0800 Subject: [PATCH] Add -- to .vscode/settings.json:vitest.commandLine * Add details on Vitest to CREATING.md --- .vscode/settings.json | 2 +- CREATING.md | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index e1f20632..06e2022e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -47,7 +47,7 @@ "editor.defaultFormatter": "DotJoshJohnson.xml" }, "npm.packageManager": "pnpm", - "vitest.commandLine": "pnpm run test:unit", + "vitest.commandLine": "pnpm run test:unit --", "markdownlint.config": { "MD033": { "allowed_elements": ["table", "td", "tr", "thead", "tbody", "img", "a"] diff --git a/CREATING.md b/CREATING.md index 7e63e5ed..13e70c78 100644 --- a/CREATING.md +++ b/CREATING.md @@ -103,7 +103,9 @@ pnpm install -D cross-env glob rimraf minimist @types/minimist sass shx vite-plu pnpm install -D ts-node tsx ``` -Add assets copying to svelte.config.js (see source file). +Add assets copying scripts `scripts/assets-copy.ts` and `scripts/assets-clean.ts` to `package.json`. + +Add assets copying during dev using 'vite-plugin-static-copy' to svelte.config.js (see source file). ### Lint Error "illegal variable name" @@ -240,6 +242,14 @@ Add some scripts: } ``` +The recommended VSCode extension Vitest "zixuanchen.vitest-explorer" provides control of unit tests in VSCode side-panel. + +#### Issue with Vitest VSCode extension + +As of 2024-0210, extension Vitest "zixuanchen.vitest-explorer" is not showing any of the tests. Of all other vitest extensions in the marketplace, none show the tests in the panel, and the ones that insert shortcuts in the source editor fail to run vitest. So there is no working integration with VSCode (tested on Windows). + +TODO: (now) file issue(s) for "zixuanchen.vitest-explorer". + ### Playwright Reports Add few lines to `playwright.config.ts` file so HTML and .json reports are generated: @@ -256,6 +266,8 @@ const config: PlaywrightTestConfig = { ... ``` +The recommended VSCode extension Microsoft Playwright Test for VSCode "ms-playwright.playwright" provides control of integration tests in VSCode side-panel. + ### Organize template components into `src/lib/components` Move `src/routes/Counter.svelte` to `src/lib/components/counter/` and change paths to match in `src/routes/+page.svelte` file where it is used.