Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

elements-sk are difficult to test with karma #8

Closed
jcgregorio opened this issue Aug 15, 2019 · 0 comments
Closed

elements-sk are difficult to test with karma #8

jcgregorio opened this issue Aug 15, 2019 · 0 comments

Comments

@jcgregorio
Copy link
Contributor

jcgregorio commented Aug 15, 2019

The elements-sk are difficult to test with karma, see for example: karma-runner/karma#412

The problem is that you can't undefine an element. The solution is to use our own function that only calls window.customElements.define() if the tag hasn't yet been defined. That has the possibility of covering up real errors, such as two different definitions for the same tag name, so a console.log error message should be generated on each such conflict, but define() should never throw in the case of a conflict.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant