-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
32 lines (31 loc) · 1 KB
/
jest.config.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
//https://github.com/FezVrasta/popper.js/issues/478
global.document = {}
global.document.createRange = () => ({
setStart: () => {},
setEnd: () => {},
commonAncestorContainer: {
nodeName: 'BODY',
ownerDocument: document
}
})
module.exports = {
preset: '@vue/cli-plugin-unit-jest',
testMatch: ['**/__tests__/**/*.test.js'],
transformIgnorePatterns: ['<rootDir>/node_modules/vue-virtual-scroller/src/components/*.vue'],
modulePathIgnorePatterns: [
// dist has to be ignored because it contains our build artefacts which should not be tested.
'<rootDir>/dist'
],
setupFiles: ['./jest.setup.js'],
coverageDirectory: '.coverage',
collectCoverageFrom: [
'packages/**/*.{js,vue}',
// do not collect coverage from:
'!**/node_modules/**', // node_modules
'!docs/**', // docs
'!**/__tests__/**/*.test.js', // tests
'!**/__tests__/**/*.e2e.js', // end to end tests
'!**/__tests__/pages/*' // e2e test pages
],
coverageReporters: ['html', 'json', 'lcov', 'clover']
}