bahmutov / cypress-svelte-unit-test

Unit testing Svelte components in Cypress E2E test runner
162 stars 21 forks source link

fix: select only body direct children when cleaning up the style #285

Closed caleb-flores closed 2 years ago

caleb-flores commented 2 years ago

When cleaning up the styles, there is a scenario where it fails with the error:

Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node

This basically happens when the component injects its own style tags.

bahmutov commented 2 years ago

Super, let me merge this so it is released