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

Split TestRunner off of TestScheduler #4233

Merged
merged 1 commit into from
Aug 10, 2017
Merged

Split TestRunner off of TestScheduler #4233

merged 1 commit into from
Aug 10, 2017

Conversation

cpojer
Copy link
Member

@cpojer cpojer commented Aug 9, 2017

Summary

Second step in making test runners pluggable. This simply splits up the big scheduler class into the TestScheduler that instruments everything and a concrete TestRunner that knows how to schedule JavaScript tests.

Test plan

jest

this._dispatcher = new ReporterDispatcher();
this._globalConfig = globalConfig;
this._testRunner = new TestRunner(globalConfig);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like TestRunner doesn't even need a state, we can do

import {runTests} from './test_runner';

// ...

runTests(globalConfig, ...restOfArguments)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is temporary and will change very soon.

@codecov-io
Copy link

Codecov Report

Merging #4233 into master will decrease coverage by 0.01%.
The diff coverage is 53.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4233      +/-   ##
==========================================
- Coverage   60.13%   60.12%   -0.02%     
==========================================
  Files         191      192       +1     
  Lines        6756     6761       +5     
  Branches        6        6              
==========================================
+ Hits         4063     4065       +2     
- Misses       2690     2693       +3     
  Partials        3        3
Impacted Files Coverage Δ
packages/jest-cli/src/test_scheduler.js 20.58% <40%> (-7.88%) ⬇️
packages/jest-cli/src/test_runner.js 55% <55%> (ø)
packages/jest-cli/src/reporter_dispatcher.js 29.41% <0%> (-11.77%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9aceeb6...bcdee2b. Read the comment docs.

@cpojer cpojer merged commit 1dbd786 into jestjs:master Aug 10, 2017
tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
@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 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants