diff --git a/jest.config.cjs b/jest.config.cjs index 7250c9d..93292d2 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -10,6 +10,8 @@ const config = { } ] }, + resolver: 'ts-jest-resolver', + testMatch: ['**/__tests__/**/*.[jt]s?(x)', '/{src,test}/**/?(*.)+(spec|test).[jt]s?(x)'], transformIgnorePatterns: ['/node_modules/(?!d3-\\.*|internmap)'], testEnvironment: 'node', extensionsToTreatAsEsm: ['.ts'] diff --git a/package-lock.json b/package-lock.json index 763aac7..234de27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -64,6 +64,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", @@ -17238,6 +17239,15 @@ "ts-jest": ">=20.0.0" } }, + "node_modules/ts-jest-resolver": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ts-jest-resolver/-/ts-jest-resolver-2.0.1.tgz", + "integrity": "sha512-FolE73BqVZCs8/RbLKxC67iaAtKpBWx7PeLKFW2zJQlOf9j851I7JRxSDenri2NFvVH3QP7v3S8q1AmL24Zb9Q==", + "dev": true, + "dependencies": { + "jest-resolve": "^29.5.0" + } + }, "node_modules/ts-jest/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", diff --git a/package.json b/package.json index 69bbbc2..3e895c1 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/evaluate-datum.test.js b/src/evaluate-datum.test.js index 4defcaa..87c82b2 100644 --- a/src/evaluate-datum.test.js +++ b/src/evaluate-datum.test.js @@ -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