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

Tests for import attributes #3829

Closed
nicolo-ribaudo opened this issue May 18, 2023 · 2 comments
Closed

Tests for import attributes #3829

nicolo-ribaudo opened this issue May 18, 2023 · 2 comments

Comments

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented May 18, 2023

Repo: https://github.com/tc39/proposal-import-attributes/
Spec text: https://tc39.es/proposal-import-attributes/
ECMA-262 PR: tc39/ecma262#3057

Import assertions have recently been changed to be "import attributes", with the following changes:

  1. the keyword is now with instead of assert
  2. the property in the dynamic import options bag is now with
  3. there are fewer restrictions about what a host can do with the given attributes

Additionally, the old syntax is still specified but marked as "normative optional, deprecated", and there is an optional fallback to lookup the assert property in the dynamic import options bag if with is undefined.

I don't think we can test (3), but for (1) and (2) we can copy the existing tests replacing assert with with. Additionally, we may need a test for dynamic import with both with and assert defined in the options bag.

Ref #3780

@JonnyTizz
Copy link

Hi! I was just browsing issues and happened across this one.

It looks like the related PR was split, and the split parts were all merged successfully. Does this mean this issue is resolved and can be closed?

Thanks!

@nicolo-ribaudo
Copy link
Member Author

Yes, thanks! :)

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 a pull request may close this issue.

2 participants