Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite failed to run, Could not find source file #1526

Closed
PizzaPartyInc opened this issue Apr 14, 2020 · 1 comment
Closed

Test suite failed to run, Could not find source file #1526

PizzaPartyInc opened this issue Apr 14, 2020 · 1 comment
Labels
Bug Report Needs Repo Need a minimium repository to reproduce the problem Needs Triage

Comments

@PizzaPartyInc
Copy link

πŸ› Bug Report

Jest fails to find tests, ends with error:

● Test suite failed to run

    Could not find source file: 'C:\path\to\project\src\test-file.spec.ts'.

      at getValidSourceFile (node_modules/typescript/lib/typescript.js:135637:29)
      at Object.getSemanticDiagnostics (node_modules/typescript/lib/typescript.js:135859:36)
      at doTypeChecking (node_modules/ts-jest/dist/compiler/language-service.js:11:35)
      at node_modules/ts-jest/dist/compiler/language-service.js:96:25
          at Array.forEach (<anonymous>)
      at compileFn (node_modules/ts-jest/dist/compiler/language-service.js:94:26)
      at Object.compile (node_modules/ts-jest/dist/compiler/instance.js:90:25)
      at TsJestTransformer.process (node_modules/ts-jest/dist/ts-jest-transformer.js:94:41)
      at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:479:35)
      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:569:40)

Jest config:

 "jest": {
    "preset": "ts-jest",
    "testEnvironment": "node"
  }

To Reproduce

The only concrete reproduction step I was able to find and fix this is to downgrade ts-jest from 25.3.1 to 25.2.1, then tests are being discovered, are running and passing. (or to make error re-appear - update it back to latest)

System:
OS: Windows 10

Npm packages:

    jest: 25.3.0
    ts-jest: 25.3.1
    typescript: 3.8.3

Please let me know if more info is needed.

@PizzaPartyInc PizzaPartyInc added Bug Report Needs Repo Need a minimium repository to reproduce the problem Needs Triage labels Apr 14, 2020
@ahnpnl
Copy link
Collaborator

ahnpnl commented Apr 14, 2020

Close as duplicated with #1506 , the fix already added. Please wait for the next release.

@ahnpnl ahnpnl closed this as completed Apr 14, 2020
NikolaiKircher added a commit to AppFridaysForFutureDE/backend that referenced this issue Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Needs Repo Need a minimium repository to reproduce the problem Needs Triage
Projects
None yet
Development

No branches or pull requests

2 participants