-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwallaby.js
39 lines (31 loc) · 894 Bytes
/
wallaby.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
module.exports = wallaby => {
process.env.VUE_CLI_BABEL_TRANSPILE_MODULES = true
const compiler = wallaby.compilers.babel({
presets: [['@vue/app', { modules: 'commonjs' }]],
})
return {
files: ['src/**/*', 'jest.config.js', 'package.json'],
tests: ['tests/**/*.spec.js'],
env: {
type: 'node',
},
compilers: {
'**/*.js': compiler,
'**/*.vue': require('wallaby-vue-compiler')(compiler),
},
preprocessors: {
'**/*.vue': file =>
require('vue-jest').process(
file.content,
file.path,
require('./package').jest || require('./jest.config'),
),
},
setup: function(wallaby) {
const jestConfig = require('./package').jest || require('./jest.config')
jestConfig.transform = {}
wallaby.testFramework.configure(jestConfig)
},
testFramework: 'jest',
}
}