2019-09-18 18:37:53 +02:00
|
|
|
const path = require('path');
|
2019-08-04 00:05:43 +02:00
|
|
|
|
2022-08-22 09:48:50 +02:00
|
|
|
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
2019-05-30 19:31:41 +02:00
|
|
|
module.exports = {
|
2021-07-29 21:48:46 +02:00
|
|
|
testEnvironment: 'jsdom',
|
2022-08-20 21:08:26 +02:00
|
|
|
preset: 'ts-jest',
|
2019-05-30 19:31:41 +02:00
|
|
|
transform: {
|
2021-09-21 09:37:11 +02:00
|
|
|
'^.+\\.jsx?$': ['babel-jest', { rootMode: 'upward' }],
|
2021-12-04 11:51:08 +01:00
|
|
|
'^.+\\.jison$': [
|
|
|
|
path.resolve(__dirname, './src/jison/transformer.js'),
|
|
|
|
{ 'token-stack': true },
|
|
|
|
],
|
2019-05-30 19:31:41 +02:00
|
|
|
},
|
2022-04-14 03:27:19 +02:00
|
|
|
transformIgnorePatterns: ['/node_modules/(?!dagre-d3-renderer/lib|khroma).*\\.js'],
|
2022-08-22 09:48:50 +02:00
|
|
|
testPathIgnorePatterns: ['/node_modules/', '.cache', './cypress'],
|
2019-05-30 19:31:41 +02:00
|
|
|
moduleNameMapper: {
|
2021-07-29 21:48:46 +02:00
|
|
|
'\\.(css|scss)$': 'identity-obj-proxy',
|
2019-08-04 00:05:43 +02:00
|
|
|
},
|
2021-07-29 21:48:46 +02:00
|
|
|
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node', 'jison'],
|
2019-09-18 18:37:53 +02:00
|
|
|
};
|