Skip to content

Increase coverage for dynamic import and top-level await#4421

Merged
nicolo-ribaudo merged 3 commits intotc39:mainfrom
nicolo-ribaudo:top-level-await
May 8, 2025
Merged

Increase coverage for dynamic import and top-level await#4421
nicolo-ribaudo merged 3 commits intotc39:mainfrom
nicolo-ribaudo:top-level-await

Conversation

@nicolo-ribaudo
Copy link
Member

This PR includes two failing cases we found in JSC while running the import defer tests, for which we didn't have previous coverage. Given that dynamic import and top level await are features on their own, it's better to also have tests for it that do not use import defer.

What these tests are testing is that dynamic import of a module that is already rejected/pending returns a promise that is rejected/pending.

@nicolo-ribaudo nicolo-ribaudo requested a review from a team as a code owner March 12, 2025 18:03
Copy link
Contributor

@ptomato ptomato left a comment

Choose a reason for hiding this comment

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

Thanks and sorry for the long delay to review. Basically good with a few minor nitpicks.

@nicolo-ribaudo
Copy link
Member Author

CI marks the new tests as passing in V8/SM/XS (expected) and failing in JSC (expected). Thanks for the review!

@nicolo-ribaudo nicolo-ribaudo merged commit bcdafc2 into tc39:main May 8, 2025
11 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the top-level-await branch May 22, 2025 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants