Skip to content

Commit

Permalink
feat: enable vitest integration in vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
dschmidt committed Apr 22, 2024
1 parent baca5b5 commit c0d8f0d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"recommendations": [
"esbenp.prettier-vscode",
"EditorConfig.EditorConfig",
"Orta.vscode-jest",
"Vue.volar",
"vitest.explorer",
"alexkrechik.cucumberautocomplete",
"vscode.typescript-language-features"
]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint": "eslint vite.config.ts '{packages,tests}/**/*.{js,ts,vue}' --color",
"serve": "SERVER=true pnpm build:w",
"test:e2e:cucumber": "NODE_TLS_REJECT_UNAUTHORIZED=0 TS_NODE_PROJECT=./tests/e2e/cucumber/tsconfig.json cucumber-js --profile=e2e -f json:tests/e2e/cucumber/report/cucumber_report.json",
"test:unit": "NODE_OPTIONS=--unhandled-rejections=throw TZ=UTC vitest --config ./tests/unit/config/vitest.config.ts",
"test:unit": "NODE_OPTIONS=--unhandled-rejections=throw vitest",
"licenses:check": "license-checker-rseidelsohn --summary --relativeLicensePath --onlyAllow 'Python-2.0;Apache*;Apache License, Version 2.0;Apache-2.0;Apache 2.0;Artistic-2.0;BSD;BSD-3-Clause;CC-BY-3.0;CC-BY-4.0;CC0-1.0;ISC;MIT;MPL-2.0;Public Domain;Unicode-TOU;Unlicense;WTFPL' --excludePackages '@ownclouders/babel-preset;@ownclouders/eslint-config;@ownclouders/prettier-config;@ownclouders/tsconfig;@ownclouders/web-client;@ownclouders/web-pkg;draw-io;external;web-app-files;text-editor;preview;web-app-ocm;@ownclouders/design-system;pdf-viewer;web-app-search;admin-settings;webfinger;web-runtime'",
"licenses:csv": "license-checker-rseidelsohn --relativeLicensePath --csv --out ./third-party-licenses/third-party-licenses.csv",
"licenses:save": "license-checker-rseidelsohn --relativeLicensePath --out /dev/null --files ./third-party-licenses/third-party-licenses",
Expand Down
1 change: 1 addition & 0 deletions tests/unit/config/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default defineConfig({
}
],
test: {
name: 'unit',
root,
globals: true,
environment: 'happy-dom',
Expand Down
6 changes: 6 additions & 0 deletions vitest.workspace.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineWorkspace } from 'vitest/config'

// set timezone for snapshot reproducibility on different machines
process.env.TZ = 'UTC'

export default defineWorkspace(['./tests/unit/config/vitest.config.ts'])

0 comments on commit c0d8f0d

Please sign in to comment.