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]: jest.config.ts not supported #6063

Closed
1 task done
richard-stafflink opened this issue Jul 28, 2022 · 2 comments · Fixed by #6074
Closed
1 task done

[Bug]: jest.config.ts not supported #6063

richard-stafflink opened this issue Jul 28, 2022 · 2 comments · Fixed by #6074
Assignees
Labels
bug/confirmed We have confirmed this is a bug

Comments

@richard-stafflink
Copy link
Contributor

richard-stafflink commented Jul 28, 2022

What's not working?

I can not use a api/jest.config.ts (TS version of the Jest config) as the name check in RW is hard coded:
https://github.com/redwoodjs/redwood/blob/main/packages/cli/src/commands/test.js#L37

According to the Jest docos jest.config.ts is allowed.

How do we reproduce the bug?

Rename jest.config.js -> jest.config.ts

yarn rw test api

Error: Missing Jest config file api/jest.config.js
To add this file, run npx @redwoodjs/codemods update-jest-config

What's your environment? (If it applies)

System:
    OS: Linux 5.15 Ubuntu 22.04 LTS 22.04 LTS (Jammy Jellyfish)
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 16.15.1 - /tmp/xfs-298f0c87/node
    Yarn: 3.2.2 - /tmp/xfs-298f0c87/yarn
  Browsers:
    Chrome: 103.0.5060.134
    Firefox: 103.0
  npmPackages:
    @redwoodjs/core: 1.2.1 => 1.2.1

Are you interested in working on this?

  • I'm interested in working on this
@richard-stafflink richard-stafflink added the bug/needs-info More information is needed for reproduction label Jul 28, 2022
@redwoodjs-bot redwoodjs-bot bot moved this to Triage in Main Jul 28, 2022
@redwoodjs-bot redwoodjs-bot bot added this to Main Jul 28, 2022
@dac09
Copy link
Contributor

dac09 commented Jul 28, 2022

Hello @richard-stafflink - thanks for raising the issue.

To be clearer, is the problem that you can't run the codemod? Or that when you run jest it doesn't use your TS jest.config file?

Confirming that the CLI (when running rw test) only checks for jest.config.js - which is the issue here.

@dac09 dac09 added bug/confirmed We have confirmed this is a bug and removed bug/needs-info More information is needed for reproduction labels Jul 28, 2022
Repository owner moved this from Triage to Done in Main Jul 28, 2022
@richard-stafflink
Copy link
Contributor Author

Thanks for the quick turnaround - much appreciated 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/confirmed We have confirmed this is a bug
Projects
Status: Done
2 participants