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

test(insertStyle): ensures that tests are run in sequence #165

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

marcalexiei
Copy link
Collaborator

Followup of #162 (comment)

coverage went down for insertStyle function - maybe you can add coverage for it in your next PR (it appears the early return statement isn't covered (https://coveralls.io/builds/70199789)).

I made all insertStyle tests run in sequence.
They need to be executed this way to ensure that the global scope is properly cleared after the test in the DOM environment.
I also added 2 assertions to be sure that only one <style /> is present inside the DOM during the test.

This should bring back insertStyle coverage to his original value.

Copy link
Owner

@elycruz elycruz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense (👍 ).

@elycruz elycruz merged commit ee6f5e1 into elycruz:main Oct 17, 2024
4 checks passed
@marcalexiei marcalexiei deleted the insert-style-test-serial branch October 17, 2024 13:14
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 this pull request may close these issues.

2 participants