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

Make jest-cli a real module. #173

Merged
merged 4 commits into from
Nov 13, 2014
Merged

Make jest-cli a real module. #173

merged 4 commits into from
Nov 13, 2014

Conversation

leebyron
Copy link
Contributor

This is dependent on #170, #171, #172. Check out da20dbe for a clearer read.

Jest now has a main file which only exports. It also has bin/jest which only executes and consumes itself as a module.

  • This results in bin/jest being much smaller and easier to understand. It's now only responsible for finding the appropriate jest module and running it's runCLI method.
  • src/jest now only exports things. It exports runCLI, as it did before, but also exports TestRunner directly, should someone wish to operate jest without CLI (an important first step to running jest in a browser for browser CI testing).
  • The runCLI method has been simplified by moving it's steps into separate functions, reducing duplicated logic and making the chain of events a bit easier to follow.

While tests are running, print out the number of remaining tests being waited on.

This looks nice when running a large number of tests
jest now has a main file which only exports. It also has bin/jest which consumes itself as a module.

This results in bin/jest being much smaller and easier to understand. It's now only responsible for finding the appropriate jest module and running it's runCLI method.

src/jest now only exports things. It exports runCLI, as it did before, but also exports TestRunner directly, should someone wish to operate jest without CLI (an important first step to running jest in a browser for browser CI testing).

the runCLI method has been simplified by moving it's steps into separate functions, reducing duplicated logic and making the chain of events a bit easier to follow.
@jeffmo
Copy link
Contributor

jeffmo commented Nov 13, 2014

jeffmo added a commit that referenced this pull request Nov 13, 2014
Make jest-cli a real module.
@jeffmo jeffmo merged commit 5ba69cb into jestjs:master Nov 13, 2014
@amasad
Copy link
Contributor

amasad commented Nov 13, 2014

nice! will this support building the internal cli with?

@leebyron leebyron deleted the real-module branch November 15, 2014 00:17
@leebyron
Copy link
Contributor Author

Working on that next. Should improve the custom CLIs.

@github-actions
Copy link

This pull request 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 15, 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

Successfully merging this pull request may close these issues.

3 participants