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

Caching of babelrc file #6205

Closed
bondom opened this issue May 18, 2018 · 5 comments
Closed

Caching of babelrc file #6205

bondom opened this issue May 18, 2018 · 5 comments

Comments

@bondom
Copy link

bondom commented May 18, 2018

🐛 Bug Report

In our project we use aliases. To be able to resolve these aliases in tests we use babelrc file.
But when we add new alias or delete old one(change babelrc file), and then run tests again, jest doesn't know about our changes to babelrc file.
Only after we run jest --clearCache, changes to babelrc are visible to jest

To Reproduce

  1. Run test which uses alias, it should run successfully
  2. Delete alias from babelrc file.
  3. Run test again, it runs successfully again - bug
  4. Run jest --clearCache,
  5. Run test again, it fails

Expected behavior

Changes to babelrc should be visible to jest without clearing of cache

Link to repl or repo (highly encouraged)

https://github.com/bondom/ts-jest-bug

Run npx envinfo --preset jest

Paste the results here:

  System:
    OS: macOS High Sierra 10.13.4
    CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
  Binaries:
    Node: 8.10.0 - /usr/local/bin/node
    npm: 6.0.1 - /usr/local/bin/npm
  npmPackages:
    @types/jest: ^22.2.3 => 22.2.3
    jest: ^22.4.3 => 22.4.3

Note: this issue is just copy of kulshekhar/ts-jest#524

@SimenB
Copy link
Member

SimenB commented May 21, 2018

Can you reproduce using just Jest? babel-jest has to my knowledge no issues cache-busting a json-based babel config (we have an issue somewhere for JS based config, but that doesn't apply here)

@bondom
Copy link
Author

bondom commented May 22, 2018

@SimenB Just tried it using just Jest. It works as expected without bugs. So it is issue of ts-jest

@SimenB
Copy link
Member

SimenB commented May 22, 2018

Awesome, thanks!

@SimenB SimenB closed this as completed May 22, 2018
@jamietre
Copy link
Contributor

we have an issue somewhere for JS based config, but that doesn't apply here

@SimenB This issue is still open which is for just .babelrc (json): #3772

Do you believe this is fixed? I'm also having trouble with this, and it looks like the cache key still does not include either relevant environment variable.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants