forked from RSamaium/RPG-JS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
25 lines (23 loc) · 884 Bytes
/
jest.config.js
File metadata and controls
25 lines (23 loc) · 884 Bytes
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
const { pathsToModuleNameMapper } = require('ts-jest')
const jestConfig = require('./packages/compiler/jest')
const { compilerOptions } = require('./tsconfig.json')
const paths = pathsToModuleNameMapper(compilerOptions.paths)
paths['^@rpgjs/(.*)$'] = '<rootDir>/packages/$1'
module.exports = {
...jestConfig,
transform: {
"\\.ts$": "ts-jest",
"\\.js$": "babel-jest",
"\\.tmx$": "<rootDir>/packages/compiler/tmx-loader/index.js",
"\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg)$": "<rootDir>/packages/compiler/jest/image.js",
"\\.(mp4|webm|wav|mp3|m4a|aac|oga|ogg)$": "<rootDir>/packages/compiler/jest/file.js",
"\\.vue$": "@vue/vue3-jest"
},
setupFiles: ["<rootDir>/packages/compiler/jest/setup.js"],
moduleNameMapper: paths,
moduleDirectories: [
"packages",
"node_modules",
"tests"
]
}