Skip to content

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Sep 14, 2022

Shouldn't make much of a difference, but in theory it means runPath can point to an ESM module

@SimenB SimenB requested a review from mrazauskas September 14, 2022 09:28
@SimenB SimenB force-pushed the use-import-over-require branch from fa24b19 to 773446e Compare September 14, 2022 09:29
@SimenB SimenB merged commit f1108ea into main Sep 14, 2022
@SimenB SimenB deleted the use-import-over-require branch September 14, 2022 09:33
onFailure: OnTestFailure,
options: TestRunnerOptions,
): Promise<void> {
const runner = (await import(runPath)).default;
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm.. I still see require in the lates version. Is this because of Babel:

const runner = (await Promise.resolve(`${runPath}`).then(s => _interopRequireWildcard(require(s)))).default;

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants