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

[Docs] Document new methods like jest.resetModuleRegistry #587

Closed
ide opened this issue Nov 3, 2015 · 5 comments
Closed

[Docs] Document new methods like jest.resetModuleRegistry #587

ide opened this issue Nov 3, 2015 · 5 comments

Comments

@ide
Copy link
Contributor

ide commented Nov 3, 2015

@cpojer if you don't have time for this could you list out the new functions in 0.7 and label this issue as "help wanted"?

@cpojer
Copy link
Member

cpojer commented Nov 3, 2015

There are no new APIs in 0.7. I removed APIs that were undocumented in open source and never should have been open sourced in the first place. jest.resetModuleRegistry() is being called implicitly before each test run. It simply wipes away the module registry for all modules and has been around forever. It was previously called require('mock-modules').dumpCache().

@cpojer cpojer closed this as completed Nov 3, 2015
@cpojer
Copy link
Member

cpojer commented Nov 3, 2015

Also, the reason I'm doing this is to

  • refactor jest into a codebase that a human can understand and read
  • replace node-haste in the future

@ide
Copy link
Contributor Author

ide commented Nov 3, 2015

Oh ok. I just remembered that a lot of tests called dumpCache() and thought that resetModuleRegistry() was a public API.

@cpojer
Copy link
Member

cpojer commented Nov 3, 2015

Yeah, it is a public API because there exists a config option to disable the reset, mainly for the react/relay open source projects. I'm hoping to kill this option and also to completely revamp configs (+ have some sort of legacy-options converter or something).

@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 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants