I configued it like following, but failed?

Yep, I had some headaches with this as well, I found somewhere that you can actually combine presets into a new preset. You need something like this:
// preset.js
const ts_preset = require('ts-jest/presets/js-with-babel/jest-preset')
const puppeteer_preset = require('jest-puppeteer/jest-preset')
module.exports = Object.assign(
ts_preset,
puppeteer_preset
)
````
then reference it from your config (I prefer to keep it in `package.json`
``` json
{
"jest": {
"preset": "./preset",
"testTimeout": 10000
}
}
This is my basic setup
jest.config.js
module.exports = {
preset: 'jest-puppeteer',
setupFilesAfterEnv: ['expect-puppeteer'],
testTimeout: 100000,
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.json',
},
},
};
Most helpful comment
Yep, I had some headaches with this as well, I found somewhere that you can actually combine presets into a new preset. You need something like this: