mirror of
https://github.com/standardnotes/app.git
synced 2026-01-11 19:56:41 +00:00
25 lines
691 B
JavaScript
25 lines
691 B
JavaScript
const pathsToModuleNameMapper = require('ts-jest').pathsToModuleNameMapper
|
|
const tsConfig = require('./tsconfig.json')
|
|
|
|
const pathsFromTsconfig = tsConfig.compilerOptions.paths
|
|
|
|
module.exports = {
|
|
restoreMocks: true,
|
|
clearMocks: true,
|
|
resetMocks: true,
|
|
moduleNameMapper: {
|
|
...pathsToModuleNameMapper(pathsFromTsconfig, {
|
|
prefix: '<rootDir>',
|
|
}),
|
|
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
|
|
'@standardnotes/toast': 'identity-obj-proxy',
|
|
},
|
|
globals: {
|
|
__WEB_VERSION__: '1.0.0',
|
|
self: {}, // fixes error happening on `import { SKAlert } from 'sn-stylekit'`
|
|
},
|
|
transform: {
|
|
'^.+\\.(ts|tsx)?$': 'ts-jest',
|
|
'\\.svg$': 'svg-jest',
|
|
},
|
|
}
|