Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork688
Migrate from Mocha to Vitest#2789
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Changes fromall commits
060f779
ca238e0
97312e7
9988933
27f9f75
22fba5a
8d75589
85cfbea
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -5,9 +5,17 @@ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Start testing", | ||
waynzh marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
"program": "${workspaceFolder}/node_modules/.bin/vitest", | ||
"args": ["run", "${file}", "--reporter=verbose"], | ||
"console": "integratedTerminal" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Start testing (watch)", | ||
"program": "${workspaceFolder}/node_modules/.bin/vitest", | ||
"args": ["${file}", "--reporter=verbose"], | ||
"console": "integratedTerminal" | ||
} | ||
] | ||
} |
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -9,18 +9,12 @@ const cp = require('child_process') | ||
const path = require('path') | ||
const semver = require('semver') | ||
const PLUGIN_DIR = path.join(__dirname, 'eslint-plugin-import') | ||
const ESLINT = `.${path.sep}node_modules${path.sep}.bin${path.sep}eslint` | ||
describe('Integration with eslint-plugin-import', () => { | ||
FloEdelmann marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
beforeAll(() => { | ||
cp.execSync('npm i', { cwd: PLUGIN_DIR, stdio: 'inherit' }) | ||
FloEdelmann marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
}) | ||
// https://github.com/vuejs/eslint-plugin-vue/issues/21#issuecomment-308957697 | ||
@@ -41,6 +35,6 @@ describe('Integration with eslint-plugin-import', () => { | ||
return | ||
} | ||
cp.execSync(`${ESLINT} a.vue`, {cwd: PLUGIN_DIR,stdio: 'inherit' }) | ||
}) | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -5,18 +5,12 @@ const cp = require('child_process') | ||
const path = require('path') | ||
const semver = require('semver') | ||
const TARGET_DIR = path.join(__dirname, 'flat-config') | ||
const ESLINT = `.${path.sep}node_modules${path.sep}.bin${path.sep}eslint` | ||
describe('Integration with flat config', () => { | ||
beforeAll(() => { | ||
cp.execSync('npm i -f', { cwd: TARGET_DIR, stdio: 'inherit' }) | ||
FloEdelmann marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
}) | ||
it('should lint without errors', () => { | ||
@@ -33,6 +27,7 @@ describe('Integration with flat config', () => { | ||
const result = JSON.parse( | ||
cp.execSync(`${ESLINT} a.vue --format=json`, { | ||
cwd: TARGET_DIR, | ||
encoding: 'utf8' | ||
}) | ||
) | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { defineConfig } from 'vitest/config'; | ||
export default defineConfig({ | ||
test: { | ||
include: [ | ||
'tests/lib/**/*.js', | ||
'tests/integrations/**/*.js' | ||
], | ||
exclude: [ | ||
'**/node_modules/**', | ||
'**/dist/**', | ||
'tests/fixtures/**', | ||
'tests/integrations/flat-config/eslint.config.js', | ||
'tests/lib/rules/no-unsupported-features/utils.js' | ||
], | ||
testTimeout: 60_000, | ||
globals: true, | ||
coverage: { | ||
provider: 'v8', | ||
include: ['lib/**/*.js'], | ||
exclude: [ | ||
'tests/**', | ||
'dist/**', | ||
'tools/**', | ||
'node_modules/**' | ||
], | ||
reporter: ['text', 'lcov', 'json-summary', 'html'], | ||
all: true, | ||
reportsDirectory: './coverage' | ||
}, | ||
}, | ||
}); |