Giter VIP home page Giter VIP logo

Comments (2)

erunion avatar erunion commented on June 11, 2024 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.

naftalimurgor avatar naftalimurgor commented on June 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.