mirror of
https://github.com/IT4Change/boilerplate-frontend.git
synced 2025-12-13 07:35:53 +00:00
vitest eslint plugin
This commit is contained in:
parent
ca951b79c6
commit
e6f34c0a81
@ -119,5 +119,14 @@
|
||||
"promise/valid-params": "warn",
|
||||
"promise/prefer-await-to-callbacks": "error",
|
||||
"promise/no-multiple-resolved": "error"
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["**/*.test.[tj]s"], // or any other pattern
|
||||
"plugins": ["vitest"],
|
||||
"extends": [
|
||||
"plugin:vitest/all"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
25
package-lock.json
generated
25
package-lock.json
generated
@ -53,6 +53,7 @@
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-security": "^1.7.1",
|
||||
"eslint-plugin-storybook": "^0.6.15",
|
||||
"eslint-plugin-vitest": "^0.3.9",
|
||||
"eslint-plugin-vue": "^9.18.1",
|
||||
"eslint-plugin-vuetify": "^2.1.0",
|
||||
"jsdom": "^22.1.0",
|
||||
@ -10418,6 +10419,30 @@
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/eslint-plugin-vitest": {
|
||||
"version": "0.3.9",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-vitest/-/eslint-plugin-vitest-0.3.9.tgz",
|
||||
"integrity": "sha512-ZGrz8dWFlotM5dwrsMLP4VcY5MizwKNV4JTnY0VKdnuCZ+qeEUMHf1qd8kRGQA3tqLvXcV929wt2ANkduq2Pgw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/utils": "^6.9.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "14.x || >= 16"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">=8.0.0",
|
||||
"vitest": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@typescript-eslint/eslint-plugin": {
|
||||
"optional": true
|
||||
},
|
||||
"vitest": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-vue": {
|
||||
"version": "9.18.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.18.1.tgz",
|
||||
|
||||
@ -86,6 +86,7 @@
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-security": "^1.7.1",
|
||||
"eslint-plugin-storybook": "^0.6.15",
|
||||
"eslint-plugin-vitest": "^0.3.9",
|
||||
"eslint-plugin-vue": "^9.18.1",
|
||||
"eslint-plugin-vuetify": "^2.1.0",
|
||||
"jsdom": "^22.1.0",
|
||||
|
||||
@ -3,11 +3,11 @@ import { describe, it, expect } from 'vitest'
|
||||
|
||||
import ClickCounter from './ClickCounter.vue'
|
||||
|
||||
describe('ClickCounter', () => {
|
||||
describe('clickCounter', () => {
|
||||
const wrapper = mount(ClickCounter)
|
||||
|
||||
it('renders Button with a Counter of 0', () => {
|
||||
expect(wrapper.find('v-btn').exists()).toBe(true)
|
||||
expect(wrapper.find('v-btn').exists()).toBeTruthy()
|
||||
expect(wrapper.text()).toBe("$t('counter') 0")
|
||||
})
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user