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

Support default exports for runners #10826

Closed
wants to merge 3 commits into from

Conversation

palmerj3
Copy link
Contributor

Summary

When writing a new runner recently I noticed I couldn't use some TypeScript/bundler configurations because Jest was never looking for default exports. This is a small change which will allow for that.

Test plan

Tests pass locally apart from some irrelevant snapshot tests and hg tests.

@palmerj3 palmerj3 requested a review from SimenB November 14, 2020 18:04
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

👍

could you add a changelog entry?

@@ -193,7 +193,8 @@ export default class TestScheduler {
contexts.forEach(context => {
const {config} = context;
if (!testRunners[config.runner]) {
const Runner: typeof TestRunner = require(config.runner);
const Runner: typeof TestRunner =
require(config.runner).default || require(config.runner);
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah ok cool. Later on I'll try to make use of this and add a changelog entry.

@SimenB
Copy link
Member

SimenB commented Nov 14, 2020

Actually, this will be covered by #8854 👍 Thanks for sending a PR tho 😀

@SimenB SimenB closed this Nov 14, 2020
@palmerj3
Copy link
Contributor Author

@SimenB ok cool - but that PR hasn't been touched in over a year. So should we merge this instead?

@jeysal
Copy link
Contributor

jeysal commented Nov 14, 2020

I believe that is only because of the breaking change. A rebase is probably all it needs to go into 27. Correct me if I'm wrong tho @SimenB

@SimenB
Copy link
Member

SimenB commented Nov 15, 2020

yep, backed out of 26 to allow it to be non-breaking

@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 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 this pull request may close these issues.

4 participants