We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a11926 commit 2280c41Copy full SHA for 2280c41
1 file changed
test/unit/code-gen/index-test.js
@@ -8,7 +8,7 @@ describe('declaration', () => {
8
describe('js', () => {
9
it('returns a custom element declaration', () => {
10
let d = new mod.ElementDeclaration('my-tag');
11
- expect(d.js).to.eql(`import MyTag from 'my-tag';\ncustomElements.define('my-tag', MyTag);`);
+ expect(d.js).to.eql(`import MyTag from 'my-tag';\nif(!customElements.get('my-tag')){\ncustomElements.define('my-tag', MyTag);\n}`);
12
});
13
14
0 commit comments