-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
39 lines (37 loc) · 1.31 KB
/
jest.config.ts
File metadata and controls
39 lines (37 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*!
* Copyright © 2015 Richard Huang <rickypc@users.noreply.github.com>
* All rights reserved.
*/
process.env.TZ = 'UTC';
module.exports = {
clearMocks: true,
collectCoverage: true,
collectCoverageFrom: ['(docs|src)/**/*.[jt]s*'],
coverageDirectory: './coverage/',
errorOnDeprecated: true,
logHeapUsage: true,
moduleNameMapper: {
'@docusaurus/(BrowserOnly|ComponentCreator|constants|ExecutionEnvironment|Head|Interpolate|isInternalUrl|Link|Noop|renderRoutes|router|Translate|use.*)': '@docusaurus/core/lib/client/exports/$1',
'@docusaurus/plugin-content-docs/client': '@docusaurus/plugin-content-docs/src/client/index.ts',
'@site/(.*)': '<rootDir>/$1',
'@theme/(.*)': '<rootDir>/src/theme/$1',
'@theme-original/(.*)': '@docusaurus/theme-classic/src/theme/$1',
},
testEnvironment: 'node',
testPathIgnorePatterns: ['<rootDir>/supports/'],
testRegex: 'tests/unit/.*.test.[jt]sx?$',
transform: {
'^.+\\.[jt]sx?$': [
'@swc/jest',
{
jsc: {
parser: { decorators: true, syntax: 'typescript', tsx: true },
target: 'es2024',
transform: { react: { runtime: 'automatic' } },
},
},
],
'\\.(avif|css|jpe?g|png|svg|webp)$': '<rootDir>/tests/unit/transformer.ts',
},
transformIgnorePatterns: ['node_modules/(?!@docusaurus/.*)'],
};