[tests] Download htest.js after the page with tests is fully rendered#34
Open
DmitrySharabin wants to merge 1 commit intomainfrom
Open
[tests] Download htest.js after the page with tests is fully rendered#34DmitrySharabin wants to merge 1 commit intomainfrom
htest.js after the page with tests is fully rendered#34DmitrySharabin wants to merge 1 commit intomainfrom
Conversation
✅ Deploy Preview for style-observer ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
htest.js after the test page is fully renderedhtest.js after the page with tests is fully rendered
375a1d1 to
851aa88
Compare
LeaVerou
reviewed
Feb 3, 2025
| }); | ||
| } | ||
|
|
||
| import("https://htest.dev/htest.js"); |
Owner
There was a problem hiding this comment.
I think reordering the scripts should work too (together with the TLA), since order is preserved.
Collaborator
Author
There was a problem hiding this comment.
I tried it many times with different approaches (like with defer). But every time the isolation of test groups and individual tests remain broken, the code from htest.js is executed before the page with tests fully rendered. What am I doing wrong?
Owner
There was a problem hiding this comment.
You should never need defer when you’re using type=module. What did you try exactly?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since we generate the tests on the fly, we need to make sure
htest.jshas something to work with (e.g., sections with tests). This lets us use the HTML-first mode of hTest to its full potential (tests navigation, isolation, etc). All those features will make debugging so much easier! However, we need this PR to be merged first.