[jest.config.ts] `maxWorkers` and `rootDir` should be optional in Config.InitialOptions
See original GitHub issue🐛 Bug Report
I’ve tried to create jest.config.ts
from the documentation example
import type { Config } from '@jest/types';
const config : Config.InitialOptions = {
verbose: true
};
export default config;
And got an error
Type '{ verbose: true; }' is missing the following properties from type 'InitialOptions': maxWorkers, rootDir
envinfo
System:
OS: macOS 10.15.7
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Binaries:
Node: 14.13.0 - ~/.nvm/versions/node/v14.13.0/bin/node
npm: 6.14.8 - ~/.nvm/versions/node/v14.13.0/bin/npm
npmPackages:
jest: ^26.6.0 => 26.6.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Configuring Jest
Configuring Jest. The Jest philosophy is to work great by default, but sometimes you just need more configuration power.
Read more >jest/normalize.ts at main · facebook/jest - GitHub
// so oldOptions[key] is the only way it should be used. const oldOptions = options as Config.InitialOptions &.
Read more >Diagnostics option | ts-jest - GitHub Pages
Each config. key is optional: warnOnly : If specified and true , diagnostics will be reported but won't stop compilation (default: disabled) ...
Read more >@jest/types Config TypeScript Examples - ProgramCreek.com
This page shows TypeScript code examples of @jest/types Config. ... Config.InitialOptions = { verbose: true, preset: 'ts-jest', testEnvironment: 'jsdom', ...
Read more >How to configure typescript with ts-jest and ts-node with rootDir
You have to specify the ts-node config in tsconfig.json. // tconfig.json { "compilerOptions": { "rootDir": "src", .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah. It looks like some of the other packages require and have installed the oldest version of the
@jest/types
. Have added it intopackage.json
explicitly. Now it works.This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.