Fork of github.com/did-method-plc/did-method-plc
1// Jest doesn't like ES modules, so we need to transpile them
2// For each one, add them to this list, add them to
3// "workspaces.nohoist" in the root package.json, and
4// make sure that a babel.config.js is in the package root
5const esModules = ['get-port', 'node-fetch'].join('|')
6
7// jestconfig.base.js
8module.exports = {
9 roots: ['<rootDir>/src', '<rootDir>/tests'],
10 transform: {
11 '^.+\\.ts$': 'ts-jest',
12 "^.+\\.js?$": "babel-jest"
13 },
14 transformIgnorePatterns: [`<rootDir>/node_modules/(?!${esModules})`],
15 testRegex: '(/tests/.*.(test|spec)).(jsx?|tsx?)$',
16 moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
17 setupFiles: ["<rootDir>/../../test-setup.ts"],
18 verbose: true,
19 testTimeout: 30000
20}