mermaid/jest.config.js
Knut Sveidqvist 73620ebee9
Merge pull request #3431 from aloisklink/other/re-enable-coverage
Re-enable coverage upload to coveralls
2022-09-12 19:04:54 +02:00

26 lines
880 B
JavaScript

// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path');
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
testEnvironment: 'jsdom',
preset: 'ts-jest',
transform: {
'^.+\\.jsx?$': ['babel-jest', { rootMode: 'upward' }],
'^.+\\.jison$': [
path.resolve(__dirname, './src/jison/transformer.js'),
{ 'token-stack': true },
],
},
coveragePathIgnorePatterns: [
'/node_modules/',
'^.+\\.jison$', // might be able to fix in future if .jison adds source-map support
],
transformIgnorePatterns: ['/node_modules/(?!dagre-d3-renderer/lib|khroma).*\\.js'],
testPathIgnorePatterns: ['/node_modules/', '.cache', './cypress'],
moduleNameMapper: {
'\\.(css|scss)$': 'identity-obj-proxy',
},
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node', 'jison'],
};