-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Evaluate what is needed to make ESM and TS support more seamless #685
Comments
Some questions: ESM support/workflow (how it works now) |
ESM support/workflow (how it works now)Right now, ES modules must be transpiled into UMD or AMD modules in order to be loaded by Work through how ESM is used to author and structure testsI don't see (other than the AMD plugin module IDs) how authoring tests in ES modules would be substantially different than how they are authored today How does Intern 4 load dependencies? How does someone include a loader for testing and/or running their app (is that a relevant question)I believe that Intern 4 (or possibly 5) should fundamentally change how it loads modules. To me, there should be some clear separations (forgive me if I use the wrong technical terms):
Right now, Intern 3 has all 5 of these, but the runner and loader are conflated (for historical reasons). I would like to see the runner and loaders separated. For a browser environment, I could see Do we need any dynamic behavior to replace loader plugins?In my opinion, no. Intern currently uses AMD plugins to simplify loading test harness interfaces ( How do we replace usage of dojo/has?From what I can see, Tests using Anything special with how we distribute our packagesWe would need to have a "core" package that would contain the generic test registration interfaces (like Anything special with test authoring structure or workflow to document?Authoring shouldn't change much. Users using AMD now can use an AMD loader, users wanting to use SystemJS can use that loader, etc. Workflow might change since how Intern works would fundamentally change. We would need to document that as we encounter workflow changes. |
@jason0x43 suggested we could remove much of the need for Intern could use some improvement in selectively running tests. For instance, if you want to conditionally register functional tests based on browser support, e.g. the test machine supports 4k resolution, there is no way to do this and Also, I'm all for splitting out Intern into separate packages as long as we still bring it all together under a single If the loader is externalized then how will Intern load suites provided to it in it's configuration? To keep it like it is, I assume we'll need a way to dynamically load modules, either by creating a wrapper around popular loaders (dojo-loader, SystemJS, WebPack, etc...) or we'd need to only use Intern programmatically and do away with the configuration-driven approach. |
That seems like a good idea: if someone wants a basic/standard install, they can use the
The loader mechanism (which would be inlined into the environment) would read the inlined intern configuration and do its thing. The inlined configuration could (should?) have paths to the files resolved (especially for globs) so the loader doesn't have to do any crazy path manipulation.
That's my thought. A small wrapper around the loader API or a hook to tell intern how to inline the loader (or loader script tag) into the environment. |
This is done |
Related issues
feel free to remove anything not relevant
The text was updated successfully, but these errors were encountered: