forked from AstarNetwork/astar-token-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
23 lines (22 loc) · 952 Bytes
/
jest.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// For more info on how to configure Jest and Polkadot check
// https://polkadot.js.org/docs/usage/FAQ/#i-am-having-trouble-with-jest-esm-and-the-libraries
// jest.config.ts
import type { Config } from '@jest/types';
// Sync object
const config: Config.InitialOptions = {
testEnvironment: 'node',
verbose: true,
preset: 'ts-jest',
transformIgnorePatterns: ['/node_modules/(?!@polkadot|@babel/runtime/helpers/esm/)'],
transform: {
'^.+\\.(js|jsx|ts|tsx|mjs)$': 'babel-jest',
},
moduleNameMapper: {
'firebase-admin/auth': '<rootDir>/node_modules/firebase-admin/lib/auth',
'firebase-admin/app': '<rootDir>/node_modules/firebase-admin/lib/app',
'firebase-admin/database': '<rootDir>/node_modules/firebase-admin/lib/database',
'firebase-admin/firestore': '<rootDir>/node_modules/firebase-admin/lib/firestore',
'^axios$': require.resolve('axios'),
},
};
export default config;