Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit ea2747c

Browse files
committed
build(jest): Fix ts thinking test globals belong to mocha.
1 parent 86d4416 commit ea2747c

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

jest.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ module.exports = {
5757
// globalTeardown: null,
5858

5959
// A set of global variables that need to be available in all test environments
60-
// globals: {},
60+
globals: {
61+
'ts-jest': {
62+
babelConfig: true,
63+
tsConfig: 'tsconfig.test.json',
64+
}
65+
},
6166

6267
// An array of directory names to be searched recursively up from the requiring module's location
6368
moduleDirectories: [

test/integration/StreamrClient.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,6 @@ describeRepeats('StreamrClient', () => {
12021202
await waitForEvent(sub, 'resent')
12031203
expect(messages).toEqual(published.slice(-3))
12041204
})
1205-
// @ts-expect-error
12061205
}, 10000)
12071206

12081207
describe('utf-8 encoding', () => {

tsconfig.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
"strict": true,
2121
"esModuleInterop": true,
2222
"resolveJsonModule": true,
23-
"moduleResolution": "node"
24-
},
25-
"globals": {
26-
"ts-jest": {}
23+
"moduleResolution": "node",
24+
"types": [
25+
"jest",
26+
"node"
27+
]
2728
},
2829
"include": [
2930
"src/**/*",

tsconfig.node.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
"strict": true,
2020
"moduleResolution": "node",
2121
"resolveJsonModule": true,
22-
"module": "commonjs"
23-
},
24-
"globals": {
25-
"ts-jest": {}
22+
"module": "commonjs",
23+
"types": [
24+
"jest",
25+
"node"
26+
]
2627
},
2728
"include": [
2829
"src/**/*",

0 commit comments

Comments
 (0)