Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 1 | const ngxWallabyJest = require('ngx-wallaby-jest'); |
| 2 | |
| 3 | module.exports = function (wallaby) { |
| 4 | return { |
| 5 | files: [ |
| 6 | 'src/**/*.+(ts|html|json|snap|css|less|sass|scss|jpg|jpeg|gif|png|svg)', |
| 7 | 'tsconfig.json', |
| 8 | 'tsconfig.spec.json', |
| 9 | 'jest.config.js', |
| 10 | '!src/**/*.spec.ts', |
| 11 | ], |
| 12 | |
| 13 | tests: ['src/**/*.spec.ts'], |
| 14 | |
| 15 | env: { |
| 16 | type: 'node', |
| 17 | runner: 'node' |
| 18 | }, |
| 19 | compilers: { |
| 20 | '**/*.ts?(x)': wallaby.compilers.typeScript({ module: 'commonjs' }), |
| 21 | }, |
| 22 | preprocessors: { |
| 23 | // This translate templateUrl and styleUrls to the right implementation |
| 24 | // For wallaby |
| 25 | 'projects/**/*.component.ts': ngxWallabyJest, |
| 26 | }, |
| 27 | testFramework: 'jest' |
| 28 | }; |
| 29 | }; |