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

feat: added converting a string url to an instance of the URL #28

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

Aleksey28
Copy link
Contributor

When we run scripts with module type filename has protocol file:///. readFile doesn't accept this format but it accepts the URL instance. In this case, it needs to transform filename to the URL instances.

@AndreyBelym AndreyBelym merged commit 0315042 into inikulin:master Dec 20, 2022
Aleksey28 added a commit to DevExpress/testcafe that referenced this pull request Jan 13, 2023
<!--
Thank you for your contribution.

Before making a PR, please read our contributing guidelines at

https://github.com/DevExpress/testcafe/blob/master/CONTRIBUTING.md#code-contribution

We recommend creating a *draft* PR, so that you can mark it as 'ready
for review' when you are done.
-->

## Purpose
Add the possibility to run tests in ESM mode

## Approach
- [X] Research ways to implement running ESM files consistently
- [X] Research ways to compile test files on the run
- [X] Add loader hooks for ESM
- [X] Run tests with dynamic import
- [x] Fix tests
- [X] Add handling error `ERR_REQUIRE_ESM`
- [X] Add workflow for running tests in ESM
- [x] Add additional tests

## References
Closes #6853
PR in `bin-v8-flags-filter`
DevExpress/bin-v8-flags-filter#1
PR in `callsite-record`
inikulin/callsite-record#28
Temp `bin-v8-flags-filter` assembling
[bin-v8-flags-filter-1.2.0.zip](https://github.com/DevExpress/testcafe/files/10175237/bin-v8-flags-filter-1.2.0.zip)
Temp `callsite-record` assembling
[callsite-record-4.1.3.zip](https://github.com/DevExpress/testcafe/files/10175241/callsite-record-4.1.3.zip)

## Pre-Merge TODO
- [x] Write tests for your proposed changes
- [x] Make sure that existing tests do not fail
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.

None yet

2 participants