Skip to content

Commit

Permalink
fix: use ts-jest-resolver to resolve compiled ts files from jest
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciopoppe committed Dec 26, 2023
1 parent f45bb6c commit d82fd75
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const config = {
}
]
},
resolver: 'ts-jest-resolver',
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '<rootDir>/{src,test}/**/?(*.)+(spec|test).[jt]s?(x)'],
transformIgnorePatterns: ['<rootDir>/node_modules/(?!d3-\\.*|internmap)'],
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts']
Expand Down
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
"tinybench": "^2.5.1",
"ts-jest": "^29.1.1",
"ts-jest-mock-import-meta": "^1.1.0",
"ts-jest-resolver": "^2.0.1",
"ts-loader": "^9.3.1",
"tsx": "^4.6.2",
"typedoc": "^0.23.15",
Expand Down
2 changes: 1 addition & 1 deletion src/evaluate-datum.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { builtInEvaluate, intervalEvaluate } from './evaluate'
import { scaleLinear as d3ScaleLinear } from 'd3-scale'
import { builtInEvaluate, intervalEvaluate } from './evaluate-datum.js'

const width = 200
const height = 100
Expand Down

0 comments on commit d82fd75

Please sign in to comment.