Comments (2)
Seeing this as well with a simpler TS config.
File '/Users/erunion/code/node_modules/jest-extended/types/index.d.ts' is not a module.ts(2306)
import { toContainKey } from 'jest-extended';
expect.extend({ toContainKey });
__tests__/tsconfig.json
:
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": ".",
"composite": true,
"outDir": "./dist",
"strict": true,
},
"include": ["**/*.ts", "**/*.js", "**/*.json", "../../global.d.ts"],
"exclude": ["__tests__", "dist", "node_modules"]
}
tsconfig.base.json
:
{
"extends": "ts-node/node14/tsconfig.json",
"ts-node": {
"swc": true
},
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"downlevelIteration": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"lib": ["ES2021"],
"moduleResolution": "node",
"noErrorTruncation": true,
"noImplicitAny": false, // @todo Remove this when we enable strict mode.
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": false, // Not running in strict mode until we have better type safety .
"target": "ES2021"
}
}
from jest-extended.
You can post a repo,I think I managed to fix this but can't recall how. You may add a repository to reproduce then I can update with appropriate fix.
Hint: fix probably in thetsconfig.json
from jest-extended.
Related Issues (20)
- Vitest typings override instead of augmenting module HOT 26
- Feature Request: Support "export" package
- Number matches should not coerce non-numbers to numbers. HOT 1
- `toEqual` passes on non-equal arrays where trailing undefined HOT 1
- `toIncludeSameMembers` output is hard to understand HOT 2
- `toHaveBeenCalledExactlyOnceWith` expects an array of objects, when the object is passed as `args` HOT 6
- Current setup instructions for Vitest don't work for asymmetric matchers' typings HOT 9
- [Bug]: The second param of toHaveBeenCalledBefore/toHaveBeenCalledAfter has default value, but is not typed as optional HOT 1
- Declaration merging does not work without exporting the CustomMatchers interface. HOT 2
- `fail` does not work when testing code using a `try/catch`
- toBeInRange bug in implementation HOT 4
- value '...actual' is not correct for toHaveBeenCalledExactlyOnceWith fail case HOT 1
- TypeScript declarations are not working when used with @jest/globals
- Use jest-diff in toHaveBeenCalledWith matcher results
- Chore: Is there any plan to upgrade yarn to the latest? HOT 2
- `toContainOneOf([string1, string2, string3])` would be nice
- BUG: nested matcher printing "object Object"
- Feature Request: Array matcher diff
- Simplify typescript recommendations HOT 4
- Feature Request: `stringContainingCaseInsensitive`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jest-extended.