forked from gdg-x/hoverboard
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
62 lines (60 loc) · 1.55 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* eslint-env node */
// Jest doesn't support ESModules https://github.com/facebook/jest/issues/4842
const esModuleDependencies = [
'@abraham/remotedata',
'@material',
'lit-element',
'lit-html',
'pwa-helpers',
'testing-library__dom',
].join('|');
module.exports = {
globals: {
'ts-jest': {
tsConfig: 'tsconfig.test.json',
},
},
projects: [
{
displayName: 'Web',
preset: 'ts-jest',
setupFilesAfterEnv: ['<rootDir>/__tests__/web.setup.ts'],
testMatch: ['<rootDir>/src/**/*.test.ts'],
transform: {
'^.+\\.[t|j]sx?$': 'ts-jest',
},
transformIgnorePatterns: [`node_modules/(?!${esModuleDependencies})`],
},
{
displayName: 'Firestore',
preset: 'ts-jest',
setupFilesAfterEnv: ['<rootDir>/__tests__/firestore.setup.ts'],
testEnvironment: 'node',
testMatch: ['<rootDir>/**/*.rules.test.ts'],
},
{
displayName: 'ESLint',
runner: 'eslint',
testMatch: ['<rootDir>/**/*.ts', '<rootDir>/**/*.js'],
},
{
displayName: 'Prettier',
preset: 'jest-runner-prettier',
testPathIgnorePatterns: ['/node_modules/', '/out-tsc/', '/dist/', '/package-lock.json/'],
},
{
displayName: 'TypeScript Web',
runner: 'tsc',
},
{
displayName: 'TypeScript Functions',
runner: 'tsc',
testMatch: ['<rootDir>/functions/**/*.ts'],
},
{
displayName: 'stylelint',
runner: 'stylelint',
testMatch: ['<rootDir>/src/components/**/*.ts', '<rootDir>/src/styles/**/*.ts'],
},
],
};