Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(vitest): fix vsocde plugin invalid #4933

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@
"lint": "npm run lint:tsc && eslint --ext .vue,.js,.ts,.tsx ./src --max-warnings 0 --cache",
"lint:tsc": "tsc --emitDeclarationOnly",
"test": "npm run test:unit && npm run test:snap",
"test:unit": "vitest run --config test/unit/vitest.config.js",
"test:update": "vitest run --config test/unit/vitest.config.js -u && npm run test:snap-update",
"test:unit-dev": "vitest --config test/unit/vitest.config.js",
"test:unit-gui": "vitest --config test/unit/vitest.config.js --ui",
"test:unit-coverage": "vitest run --config test/unit/vitest.config.js --coverage",
"test:snap": "cross-env NODE_ENV=test-snap vitest run --config test/unit/vitest.config.js",
"test:snap-update": "cross-env NODE_ENV=test-snap vitest run --config test/unit/vitest.config.js -u",
"test:unit": "vitest run ",
"test:update": "vitest run -u && npm run test:snap-update",
"test:unit-dev": "vitest ",
"test:unit-gui": "vitest --ui",
"test:unit-coverage": "vitest run --coverage",
"test:snap": "cross-env NODE_ENV=test-snap vitest run ",
"test:snap-update": "cross-env NODE_ENV=test-snap vitest run -u",
"test:e2e": "cypress run --config-file test/cypress/cypress.config.js --component",
"test:e2e-gui": "cypress open --config-file test/cypress/cypress.config.js",
"robot": "publish-cli robot-msg",
Expand Down
5 changes: 2 additions & 3 deletions test/unit/vitest.config.js → vitest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as path from 'path';
import { resolveConfig, basePlugin } from '../../script/vite.base.config';
import { resolveConfig, basePlugin } from './script/vite.base.config';

// 单元测试相关配置
const testConfig = {
Expand All @@ -10,7 +9,7 @@ const testConfig = {
globals: true,
environment: 'jsdom',
testTimeout: 5000,
setupFiles: process.env.NODE_ENV === 'test-snap' ? path.resolve(__dirname, './test-setup.js') : '',
setupFiles: process.env.NODE_ENV === 'test-snap' ? './test/unit/test-setup.js' : '',
transformMode: {
web: [/\.[jt]sx$/],
},
Expand Down
Loading