Skip to content

Commit

Permalink
[gh-59] setup vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
obadakhalili committed Jul 23, 2022
1 parent 4c9c817 commit e280bac
Show file tree
Hide file tree
Showing 4 changed files with 285 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"dev": "vite --port 8081",
"dev:rebuild": "yarn run dev --force",
"format": "yarn run prettier --ignore-path ../../.gitignore --write",
"test": "yarn vitest run",
"test:watch": "yarn vitest",
"preversion": "npm run build"
},
"dependencies": {
Expand All @@ -46,6 +48,7 @@
"@rollup/plugin-node-resolve": "13.3.0",
"@types/jest": "26.0.23",
"@vitejs/plugin-vue": "2.3.3",
"@vitest/ui": "^0.18.1",
"@vue/compiler-sfc": "3.2.37",
"autoprefixer": "10.4.7",
"jest": "26.6.3",
Expand All @@ -61,6 +64,7 @@
"ts-jest": "26.5.4",
"typescript": "4.7.4",
"vite": "2.9.13",
"vitest": "^0.18.1",
"vue": "3.2.37"
},
"peerDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions packages/vue3/src/tests/VueVisualFilter.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
it("should pass", () => {
expect(true).toBe(true)
})
5 changes: 4 additions & 1 deletion packages/vue3/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const { defineConfig } = require("vite")
const { defineConfig } = require("vitest/config")
const vue = require("@vitejs/plugin-vue")

module.exports = defineConfig({
...require("../../vite.config.js"),
plugins: [vue()],
test: {
globals: true,
},
})
Loading

0 comments on commit e280bac

Please sign in to comment.