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

[Bug]: TsJestTransformerOptions throw type error #4247

Open
jpwallace22 opened this issue Dec 27, 2023 · 0 comments
Open

[Bug]: TsJestTransformerOptions throw type error #4247

jpwallace22 opened this issue Dec 27, 2023 · 0 comments

Comments

@jpwallace22
Copy link

Version

29.1.1

Steps to reproduce

Reproduction: Codesandbox

  • Create a jest.config.ts
  • add a transform property NOT within the config object.
  • assign it types
  • See properly assigned types fail

I have set up multiple scenarios within the reproduction that show how it fails when it shouldn't.

Expected behavior

I expect TsJestTransformerOptions to be valid types for the transform options.

Actual behavior

JestConfigWithTsJest will throw a type error if TsJestTransformerOptions is used where it should be

Debug log

Not applicable, this is a type error in the config and doesn't require the test runner

Additional context

Reproduction: Codesandbox

Environment

System:
    OS: macOS 13.5
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 20.5.1 - ~/.nvm/versions/node/v20.5.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v20.5.1/bin/yarn
    npm: 9.8.0 - ~/.nvm/versions/node/v20.5.1/bin/npm
  npmPackages:
    jest: ^29.7.0 => 29.7.0

&& 

  System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (2) x64 AMD EPYC
  Binaries:
    Node: 20.9.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.8.1 - /usr/local/bin/npm
    pnpm: 8.10.2 - /usr/local/share/npm-global/bin/pnpm
  npmPackages:
    jest: ^29.7.0 => 29.7.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant