Skip to content

Commit 6876292

Browse files
committed
chore(ci): Switch base-driver unit tests to ts-jest
1 parent 14c8f01 commit 6876292

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
const base = require('../../jest.base.config');
1+
const base = require('../../jest.base-ts.config');
22

33
/** @type {import('jest').Config} */
44
module.exports = {
55
...base,
66
rootDir: '.',
7+
transform: {
8+
'^.+\\.ts$': ['ts-jest', {
9+
tsconfig: '<rootDir>/tsconfig.jest.json'
10+
}],
11+
},
712
};

packages/cubejs-base-driver/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"tsc": "tsc",
1919
"watch": "tsc -w",
2020
"test": "npm run unit && npm run integration",
21-
"unit": "jest --runInBand --coverage --verbose dist/test/unit",
21+
"unit": "jest --runInBand --coverage --verbose test/unit",
2222
"lint": "eslint src/* test/* --ext .ts,.js",
2323
"lint:fix": "eslint --fix src/* test/* --ext .ts,.js"
2424
},
@@ -41,6 +41,7 @@
4141
"@types/jest": "^29",
4242
"@types/node": "^20",
4343
"jest": "^29",
44+
"ts-jest": "^29",
4445
"typescript": "~5.2.2"
4546
},
4647
"license": "Apache-2.0",
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"module": "CommonJS",
5+
"paths": {
6+
"@cubejs-backend/shared": ["../cubejs-backend-shared/src"]
7+
}
8+
}
9+
}

0 commit comments

Comments
 (0)