-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
feat(jest-runner): improve typings by exposing TestRunner
abstract classes
#12646
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, this is awesome!
(Changelog?)
const runnerContext = {} as TestRunnerContext; | ||
|
||
class CallbackRunner extends CallbackTestRunner { | ||
async runTests( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping that override
here in a test could catch some drift (hence #12648). Apparently override
has no effect in this case, because methods are marked abstract
.
In the other hand, abstract
requires to implement those methods in a derived class. So to have this test passing is still good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonderful!
@mrazauskas wanna take a stab at a PR in |
Yes, I was looking at it already. Will do it after finishing |
Awesome 🎉 |
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. |
Following up #12641
Summary
jest-core
supports two kinds of test runner. What ifjest-runner
would expose two abstract classes, which would help to implement either kind of the runner?For instance
create-jest-runner
could use these types here. Not to say that I would like to have this for my test runner ;DTodo:
Test plan
Green CI.