File tree 4 files changed +14
-7
lines changed 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -122,8 +122,14 @@ jobs:
122
122
- name : Test unit
123
123
run : yarn run test:unit --coverage --maxWorkers=2
124
124
125
+ - name : Test unit (Vue 3)
126
+ run : yarn run test:unit --coverage --maxWorkers=2
127
+ env :
128
+ USE_VUE3 : ' 1'
129
+
125
130
- name : CodeCov
126
131
uses : codecov/codecov-action@v2.1.0
127
132
with :
128
133
token : ${{ secrets.CODECOV_TOKEN }}
129
134
flags : unittests
135
+ files : ./coverage/clover.xml,./coverage-vue3/clover.xml
Original file line number Diff line number Diff line change 4
4
.vercel /
5
5
.vscode /
6
6
coverage /
7
+ coverage-vue3 /
7
8
dist /
8
9
docs-dist /
9
10
esm /
Original file line number Diff line number Diff line change 1
- const useVue2 = 'USE_VUE2 ' in process . env
1
+ const useVue3 = 'USE_VUE3 ' in process . env
2
2
3
- const moduleNameMapper = useVue2
4
- ? { }
5
- : {
3
+ const moduleNameMapper = useVue3
4
+ ? {
6
5
'^vue$' : '@vue/compat' ,
7
6
'^@vue/test-utils$' : '@vue/test-utils-vue3'
8
7
}
8
+ : { }
9
9
10
10
module . exports = {
11
11
testRegex : 'spec.js$' ,
@@ -15,7 +15,7 @@ module.exports = {
15
15
'^.+\\.js$' : 'babel-jest'
16
16
} ,
17
17
transformIgnorePatterns : [ '/node_modules(?![\\\\/]vue-test-utils-compat[\\\\/])' ] ,
18
- coverageDirectory : './coverage/' ,
18
+ coverageDirectory : useVue3 ? './coverage-vue3' : './coverage/' ,
19
19
testEnvironmentOptions : {
20
20
pretendToBeVisual : true
21
21
} ,
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ import Vue from 'vue'
3
3
import * as VTU from '@vue/test-utils'
4
4
import { installCompat as installVTUCompat , fullCompatConfig } from 'vue-test-utils-compat'
5
5
6
- const useVue2 = 'USE_VUE2 ' in process . env
7
- if ( ! useVue2 ) {
6
+ const useVue3 = 'USE_VUE3 ' in process . env
7
+ if ( useVue3 ) {
8
8
Vue . configureCompat ( {
9
9
MODE : 2 ,
10
10
ATTR_FALSE_VALUE : 'suppress-warning' ,
You can’t perform that action at this time.
0 commit comments