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

Converting Js type text/javascript to ESM modules #785

Open
lawal-olaotan opened this issue Aug 16, 2023 · 0 comments
Open

Converting Js type text/javascript to ESM modules #785

lawal-olaotan opened this issue Aug 16, 2023 · 0 comments
Assignees

Comments

@lawal-olaotan
Copy link
Contributor

lawal-olaotan commented Aug 16, 2023

This ticket is related to #766

Having explored how to incorporate unit and integration testing to the current knetminer client-side architecture using Vitest, which is almost similar to Jest. It was discovered the file type text/javascript attributed to Knetminer Js files is currently outdated and discouraged by HTML5 specification as discussed in this SO thread making it impossible to use assertion libraries as most are compatible with CommonJs and ESM JS module system.

As a result, I propose that knetminer's Javascript files be converted to type modules using ESM specification so that it units can be imported to where it's needed and the issue specified in #766 can be resolved. Also, ESM modules are currently supported across web browsers as specified by MDN javascript module guides making it the best approach to incorporate unit testing to knetminer client-side js files.

@lawal-olaotan lawal-olaotan self-assigned this Aug 16, 2023
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

No branches or pull requests

1 participant