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

Remove or extract binary script from jest-runtime #10011

Closed
SimenB opened this issue May 9, 2020 · 7 comments · Fixed by #10016
Closed

Remove or extract binary script from jest-runtime #10011

SimenB opened this issue May 9, 2020 · 7 comments · Fixed by #10016
Milestone

Comments

@SimenB
Copy link
Member

SimenB commented May 9, 2020

From #9712.

https://github.com/facebook/jest/tree/c6e63f331b491082075aef4c48ced355ae72add5/packages/jest-runtime/src/cli

We can either just remove it (I'm not really sure about the use case for it, it was added in #1193) or at least extract it out into its own package.

@ghostd
Copy link
Contributor

ghostd commented May 9, 2020

I started to work on this. The CLI of jest-runtime is used by jest-repl. What's the best option? Create a dedicated module (jest-runtme-cli?) or just move the code into jest-repl?

@SimenB
Copy link
Member Author

SimenB commented May 9, 2020

I think moving it into jest-repl makes sense - to the degree jest-repl is useful I think it's the only valid consumer of the CLI interface of the runtime. If somebody then ends up missing it as a standalone thing, we can extract it at that point

ghostd added a commit to ghostd/jest that referenced this issue May 10, 2020
ghostd added a commit to ghostd/jest that referenced this issue May 10, 2020
@ghostd
Copy link
Contributor

ghostd commented May 10, 2020

ghostd added a commit to ghostd/jest that referenced this issue May 10, 2020
@SimenB
Copy link
Member Author

SimenB commented May 10, 2020

Test should use https://github.com/facebook/jest/blob/master/TestUtils.ts instead of normalize

@ghostd
Copy link
Contributor

ghostd commented May 10, 2020

Some tests have settings like this:

const moduleNameMapper = {
  mappedToDirectory: '<rootDir>/MyDirectoryModule',
}

The <rootDir> is converted by jest-config. Should i also copy the helper method into TestUtils.ts? Or change the mapping to use an path.join. On one hand we duplicate some code, on the other hand we dont use the jest feature...

@ghostd
Copy link
Contributor

ghostd commented May 10, 2020

As createRuntime set the rootDir option; i think this function should also converts the mapper paths.

ghostd added a commit to ghostd/jest that referenced this issue May 10, 2020
ghostd added a commit to ghostd/jest that referenced this issue May 10, 2020
ghostd added a commit to ghostd/jest that referenced this issue May 11, 2020
ghostd added a commit to ghostd/jest that referenced this issue Jun 3, 2020
ghostd added a commit to ghostd/jest that referenced this issue Jun 4, 2020
ghostd added a commit to ghostd/jest that referenced this issue Nov 14, 2020
ghostd added a commit to ghostd/jest that referenced this issue Nov 14, 2020
@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 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants