-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add Basic Integration Tests #11
Conversation
When writing tests I found that our script tag functionality in dev mode has problems if you add a trailing slash to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just see two minor improvements.
Co-authored-by: Oliver Eilhard <oliver@eilhard.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you. 🎈
Will merge in a minute.
This PR adds some initial integration tests for the helper function part of this library; by integration tests I mean that I am only tested exported functionality of the library, by creating a Vite Fragment and then checking the contents of that generated HTML fragment.
The tests are based on the instructions in the Vite docs for backend integration, so I have added the manifest they use in those docs, and then I check that each of the HTML tags the docs say should be generated are contained in the fragment we produce with this library.
After writing the tests, they failed initially, as I think we are generating the
modulepreload
links incorrectly. So I have added a change to fix how we generate the<link>
elements for preloading.