Repository navigation
Expand file tree
/
Copy pathjest.config.js
More file actions
42 lines (41 loc) · 1.67 KB
/
Copy pathjest.config.js
File metadata and controls
42 lines (41 loc) · 1.67 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
40
41
42
const babelConfig = require('./babel.config');
module.exports = {
setupFilesAfterEnv: ['./tests/init.ts'],
moduleNameMapper: {
// Match the production build alias: TL-B preview bundles @ton-community/tlb-runtime
// against the app's top-level @ton/core instead of its nested copy.
'^@ton/core(.*)$': '<rootDir>/node_modules/@ton/core$1',
'\\.(css|scss|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|tgs)$':
'<rootDir>/tests/staticFileMock.js',
// Vite import suffixes for bundled workers, asset URLs and raw file contents
'\\?(worker|url|raw)$': '<rootDir>/tests/staticFileMock.js',
},
testPathIgnorePatterns: [
'<rootDir>/tests/playwright/',
'<rootDir>/node_modules/',
'<rootDir>/client/src/stylesheets/',
// Local-only artifacts: agent worktrees (full repo copies), headless build output,
// SwiftPM checkouts under mobile carry their own test.js files
'<rootDir>/.claude/',
'<rootDir>/worktrees/',
'<rootDir>/headless/',
'<rootDir>/mobile/',
],
// Repo copies in local worktree directories duplicate workspace packages (e.g. @mytonwallet/air-app-launcher)
// and break jest-haste-map module resolution
modulePathIgnorePatterns: [
'<rootDir>/.claude/',
'<rootDir>/worktrees/',
],
testEnvironment: 'jest-environment-jsdom',
transform: {
'\\.(jsx?|tsx?)$': ['babel-jest', {
...babelConfig,
plugins: [...babelConfig.plugins, 'babel-plugin-transform-import-meta'],
}],
},
// ESM-only packages: `uint8arrays` and `multiformats` come with the WalletConnect SDK
transformIgnorePatterns: [
'/node_modules/(?!(axios|uint8arrays|multiformats)/)',
],
};