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

ES6 module support for Runner object API #8213

Closed
XieWren opened this issue Jun 13, 2024 · 1 comment · Fixed by #8230
Closed

ES6 module support for Runner object API #8213

XieWren opened this issue Jun 13, 2024 · 1 comment · Fixed by #8230
Assignees
Labels
STATE: Issue accepted An issue has been reproduced. TYPE: enhancement The accepted proposal for future implementation.

Comments

@XieWren
Copy link

XieWren commented Jun 13, 2024

What is your Scenario?

I am using TypeScript for writing TestCafe tests, which favours ESM import syntax over the older CommonJS.
I benefit a lot from being able to run tests programmatically through the Runner object.

For standardisation and optimisation, I would like to transpile my TS to ESM JS. TestCafe dropped the experimental flag from --esm in v2.5.0 for the CLI API, but there is no matching option within the Runner object.

What are you suggesting?

Add an option to enable ESM support in the Runner object, either in Runner.run method options, createTestCafe options, or as a separate method.

Alternatively, the runner could automatically handle ESM or CommonJS based on the file extension provided (.mjs vs .cjs)

What alternatives have you considered?

I tried using the latter of my suggestions, but it was not implemented.

Additional context

No response

@XieWren XieWren added the TYPE: enhancement The accepted proposal for future implementation. label Jun 13, 2024
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jun 13, 2024
@Bayheck Bayheck added STATE: Issue accepted An issue has been reproduced. and removed STATE: Need response An issue that requires a response or attention from the team. labels Jun 17, 2024
Copy link

We appreciate you taking the time to share information about this issue. We reproduced the bug and added this ticket to our internal task queue. We'll update this thread once we have news.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATE: Issue accepted An issue has been reproduced. TYPE: enhancement The accepted proposal for future implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants