Skip to content

Commit e4abc6d

Browse files
committed
trying to fix jest tests + client core build
1 parent ac4cca6 commit e4abc6d

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

jest.base.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ module.exports = {
1616
'^uuid$': require.resolve('uuid'),
1717
'^yaml$': require.resolve('yaml'),
1818
},
19+
setupFiles: ['../../jest.setup.js'],
1920
snapshotFormat: {
2021
escapeString: true, // To keep existing variant of snapshots
2122
printBasicPrototype: true

jest.setup.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const { webcrypto } = require('node:crypto');
2+
3+
if (!globalThis.crypto) {
4+
globalThis.crypto = webcrypto;
5+
}

packages/cubejs-client-core/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"compilerOptions": {
88
"lib": ["ES2020"],
99
"target": "ES2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
10-
"module": "ES2020",
11-
"moduleResolution": "node",
10+
"module": "commonjs",
1211
"declaration": true,
1312
"declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
1413
"declarationDir": "./dist", /* Generates a sourcemap for each corresponding '.d.ts' file. */

0 commit comments

Comments
 (0)