Skip to content
Snippets Groups Projects
Verified Commit 49a981b6 authored by Georg Krause's avatar Georg Krause
Browse files

Add Unit testing

parent ccecc09f
No related branches found
No related tags found
No related merge requests found
.DS_Store
node_modules
/dist
/coverage
# local env files
......
{
"name": "vui2",
"name": "vui",
"version": "0.0.0",
"license": "AGPL-3.0-or-later",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview"
"preview": "vite preview",
"test": "vitest run --coverage"
},
"dependencies": {
"@funkwhale/ui": "/home/georg/workspace/funkwhale/ui",
"vue": "^3.2.25"
},
"devDependencies": {
"@testing-library/vue": "^6.4.2",
"@vitejs/plugin-vue": "^2.0.0",
"c8": "^7.11.0",
"happy-dom": "^2.31.1",
"sass": "^1.49.7",
"typescript": "^4.4.4",
"vite": "^2.7.2",
"vitest": "^0.2.8",
"vue-tsc": "^0.29.8"
}
}
import {render} from '@testing-library/vue'
import FunkwhaleButton from './FunkwhaleButton.vue'
test('it should work', () => {
const {getByText} = render(FunkwhaleButton, {
props: {
text: 'Button Test'
}
})
getByText('Button Test')
})
......@@ -3,5 +3,9 @@ import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()]
plugins: [vue()],
test: {
global: true,
environment: 'happy-dom'
}
})
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment