Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
module.exports = {
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
automock: false,
transform: {
'^.+\\.[jt]sx?$': [
'babel-jest',
{ configFile: `${__dirname}/babel.config.js` },
],
},
transformIgnorePatterns: [
'/node_modules/(?!(three|@react-pdf|@react-pdf/renderer|nanoid)/)',
],
// plugins/* are standalone npm projects (own node_modules, ESM-only SDK
// dependency) with their own Vitest suites — see plugins/<name>/package.json.
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/plugins/'],
moduleNameMapper: {
'\\.(css|less|scss|sass|styl)$':
'<rootDir>/src/app/src/__mocks__/styleMock.js',
'\\.(jpg|jpeg|png|gif|svg)$':
'<rootDir>/src/app/src/__mocks__/fileMock.js',
'^app/(.*)$': '<rootDir>/src/app/src/$1',
"^server/(.*)$": "<rootDir>/src/server/$1",
'^(\\.{1,2}/)*config/settings$':
'<rootDir>/src/app/src/config/__mocks__/settings.ts',
'react-syntax-highlighter':
'<rootDir>/src/app/src/__mocks__/reactSyntaxHighlighterMock.js',
'^react-markdown$':
'<rootDir>/src/app/src/__mocks__/reactMarkdownMock.js',
'^app-root/(.*)$': '<rootDir>/$1',
'^react-icons/(.*)$':
'<rootDir>/src/app/src/__mocks__/reactIconsMock.js',
'^@/(.*)$': '<rootDir>/src/app/src/$1',
'^react$': '<rootDir>/node_modules/react',
'^react-dom$': '<rootDir>/node_modules/react-dom',
'^react-dom/(.*)$': '<rootDir>/node_modules/react-dom/$1',
'^react-redux$': '<rootDir>/node_modules/react-redux',
'^@react-pdf/renderer$':
'<rootDir>/src/app/src/__mocks__/reactPdfMock.js',
},
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/*.test.[jt]s?(x)'],
haste: {
forceNodeFilesystemAPI: true,
},
};
b841128f4This file is pinned to the selected release. Download the original to open it in your design tool.