Skip to content

Commit 0a57c2b

Browse files
support typescript in jest files (#3132)
1 parent 6a4195f commit 0a57c2b

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ src/webkit/protocol.ts
1313
/index.d.ts
1414
utils/generate_types/overrides.d.ts
1515
utils/generate_types/test/test.ts
16+
test/

jest.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ module.exports = /** @type {import('@jest/types').Config.InitialOptions} */ ({
88
testTimeout: 10000,
99
globalSetup: './jest/setup.js',
1010
globalTeardown: './jest/teardown.js',
11+
transform: {
12+
'^.+\\.ts$': ['babel-jest', {
13+
presets: [
14+
['@babel/preset-env', {
15+
targets: {
16+
node: 'current'
17+
}
18+
}],
19+
['@babel/preset-typescript']
20+
],
21+
}],
22+
},
1123
reporters: [
1224
'default',
1325
'./jest/reporter'

0 commit comments

Comments
 (0)