mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.1 KiB
JavaScript
33 lines
1.1 KiB
JavaScript
4 years ago
|
const regeneratorRuntime = require('regenerator-runtime');
|
||
4 years ago
|
const { pathsToModuleNameMapper } = require('ts-jest');
|
||
3 years ago
|
const webCompilerOptions = require('./tsconfig.test.json').compilerOptions;
|
||
4 years ago
|
|
||
4 years ago
|
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
||
4 years ago
|
module.exports = {
|
||
|
preset: 'ts-jest',
|
||
|
testEnvironment: 'jsdom',
|
||
|
moduleNameMapper: {
|
||
|
'\\.(css|less|scss)$': 'identity-obj-proxy',
|
||
4 years ago
|
...pathsToModuleNameMapper(webCompilerOptions.paths, {
|
||
4 years ago
|
prefix: '<rootDir>/',
|
||
4 years ago
|
}),
|
||
4 years ago
|
},
|
||
4 years ago
|
// projects: ['<rootDir>/web/'], // https://jestjs.io/docs/configuration#projects-arraystring--projectconfig
|
||
4 years ago
|
rootDir: '.',
|
||
4 years ago
|
testRegex: '.*\\.(test|spec)\\.tsx?$',
|
||
3 years ago
|
testPathIgnorePatterns: ['/node_modules/', '/e2e/'],
|
||
4 years ago
|
transform: {
|
||
|
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
|
||
4 years ago
|
'<rootDir>/test/fileTransformer.js',
|
||
4 years ago
|
},
|
||
|
transformIgnorePatterns: ['/node_modules/'],
|
||
4 years ago
|
setupFiles: ['<rootDir>/test/setup.js'],
|
||
4 years ago
|
setupFilesAfterEnv: [],
|
||
|
globals: {
|
||
|
window: {},
|
||
3 years ago
|
'ts-jest': {
|
||
|
tsconfig: 'tsconfig.test.json',
|
||
|
},
|
||
4 years ago
|
},
|
||
|
};
|