Skip to content

Commit f1993ac

Browse files
committed
test: fix jest in cli and common
1 parent 0239c56 commit f1993ac

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

packages/indexer-cli/jest.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ module.exports = {
1313
// The glob patterns Jest uses to detect test files
1414
testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
1515
testPathIgnorePatterns: ['/node_modules/', '/dist/', '.yalc'],
16+
transformIgnorePatterns: [
17+
// Transform @graphprotocol packages but ignore other node_modules
18+
'/node_modules/(?!(@graphprotocol)/)'
19+
],
20+
transform: {
21+
'^.+\\.(t|j)sx?$': ['ts-jest']
22+
},
1623
testTimeout: 60000,
1724
globals: {
1825
__DATABASE__: {

packages/indexer-common/jest.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ module.exports = {
1111
forceExit: true,
1212
testEnvironment: 'node',
1313
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/.yalc', 'util.ts'],
14-
transformIgnorePatterns: ['!node_modules/'],
14+
transformIgnorePatterns: [
15+
// Transform @graphprotocol packages but ignore other node_modules
16+
'/node_modules/(?!(@graphprotocol)/)'
17+
],
18+
transform: {
19+
'^.+\\.(t|j)sx?$': ['ts-jest']
20+
},
1521
globals: {
1622
__DATABASE__: {
1723
host: process.env.POSTGRES_TEST_HOST || bail('POSTGRES_TEST_HOST is not defined'),

0 commit comments

Comments
 (0)