support typescript in jest files (#3132)
This commit is contained in:
Родитель
6a4195fd1d
Коммит
0a57c2b39e
|
@ -13,3 +13,4 @@ src/webkit/protocol.ts
|
|||
/index.d.ts
|
||||
utils/generate_types/overrides.d.ts
|
||||
utils/generate_types/test/test.ts
|
||||
test/
|
||||
|
|
|
@ -8,6 +8,18 @@ module.exports = /** @type {import('@jest/types').Config.InitialOptions} */ ({
|
|||
testTimeout: 10000,
|
||||
globalSetup: './jest/setup.js',
|
||||
globalTeardown: './jest/teardown.js',
|
||||
transform: {
|
||||
'^.+\\.ts$': ['babel-jest', {
|
||||
presets: [
|
||||
['@babel/preset-env', {
|
||||
targets: {
|
||||
node: 'current'
|
||||
}
|
||||
}],
|
||||
['@babel/preset-typescript']
|
||||
],
|
||||
}],
|
||||
},
|
||||
reporters: [
|
||||
'default',
|
||||
'./jest/reporter'
|
||||
|
|
Загрузка…
Ссылка в новой задаче