You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
632 B
17 lines
632 B
const NG = process.env.NG || '1.7';
|
|
|
|
console.log(`Testing with AngularJS ${NG}`);
|
|
|
|
module.exports = {
|
|
preset: 'ts-jest',
|
|
testEnvironment: 'jsdom',
|
|
roots: ['src', 'test'],
|
|
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)', '**/?*Spec.[jt]s'],
|
|
setupFilesAfterEnv: ['./test/jest.init.ts'],
|
|
moduleNameMapper: {
|
|
'^angular$': '<rootDir>/test/angular/jest-angular.js',
|
|
'^jest-angular-import$': `<rootDir>/test/angular/${NG}/angular.js`,
|
|
'^angular-animate$': `<rootDir>/test/angular/${NG}/angular-animate.js`,
|
|
'^angular-mocks$': `<rootDir>/test/angular/${NG}/angular-mocks.js`,
|
|
},
|
|
};
|