Skip to content

exclude option excludes all files from type checking #2634

Closed
@drrnkin

Description

@drrnkin

🐛 Bug Report

Compiler errors are not detected in any typescript file if an exclude option is present. The exclude option appears to exclude all files no matter what is specified. Eg. exclude: ['NOTHING'] causes all source files to be excluded from type-checking.

To Reproduce

Steps to reproduce the behavior:

  • Unzip the attached tsJestExclude.zip
  • yarn
  • yarn test

Note that the compiler errors in thing.test.ts are not detected. If you remove the exclude from jest.config.js, then they'll be detected. You can also add similar errors to thing.ts and it also won't be detected.

tsJestExclude.zip

Expected behavior

Errors should be reported in files that don't match the entries in the exclude option.

envinfo

System:
    OS: Windows
    Node version: v14.16.1
    Yarn version: 1.22.5

Npm packages:
    jest:
    ts-jest:
    typescript:

Activity

changed the title [-]exclude option excludes all files from compl[/-] [+]exclude option excludes all files from compilation[/+] on May 28, 2021
changed the title [-]exclude option excludes all files from compilation[/-] [+]exclude option excludes all files from type checking[/+] on May 29, 2021
added a commit that references this issue on May 30, 2021
c5ce979
added a commit that references this issue on Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @ahnpnl@drrnkin

      Issue actions

        exclude option excludes all files from type checking · Issue #2634 · kulshekhar/ts-jest