UNPKG

@yehia2amer/ngx-inline-editor

Version:

Follow me [![twitter](https://img.shields.io/twitter/follow/carlillo.svg?style=social&label=%20carlillo)](https://twitter.com/carlillo) to be notified about new releases.

27 lines (25 loc) 900 B
// jest.config.js const { pathsToModuleNameMapper } = require('ts-jest/utils'); // In the following statement, replace `./tsconfig` with the path to your `tsconfig` file // which contains the path mapping (ie the `compilerOptions.paths` option): const { compilerOptions } = require('./src/tsconfig.spec'); module.exports = { moduleFileExtensions: ['js', 'json', 'ts'], rootDir: 'src', bail: true, setupTestFrameworkScriptFile: '../jest.setup.ts', // testRegex: '/src/.*\\.(test|spec).(ts|tsx|js)$', moduleDirectories: ['node_modules', 'src'], // So important, whithout this, custom paths don't work transform: { '^.+\\.tsx?$': 'ts-jest', }, globals: { 'ts-jest': { tsConfig: 'src/tsconfig.spec.json', diagnostics: false, }, }, coverageDirectory: '../coverage', moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths), preset: 'ts-jest', };