forked from proto-kit/framework
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.cjs
28 lines (27 loc) · 919 Bytes
/
jest.config.cjs
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
/* eslint-disable no-undef */
/* eslint-disable import/unambiguous */
/* eslint-disable import/no-commonjs */
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
// because we run tests from within ./packages/<package_name>/
rootDir: './../../',
moduleDirectories: ["node_modules", "packages"],
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'o1js/dist/(.*)': '<rootDir>/node_modules/o1js/dist/$1',
'../../../node_modules/o1js/dist/(.*)': '<rootDir>/node_modules/o1js/dist/$1',
'../../../../node_modules/o1js/dist/(.*)': '<rootDir>/node_modules/o1js/dist/$1',
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
// '^.+\\.[tj]sx?$' to process js/ts with `ts-jest`
// '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest`
'^.+\\.tsx?$': [
'ts-jest',
{
useESM: true,
tsconfig: './test/tsconfig.json'
},
],
},
};