Skip to content

Commit b11b830

Browse files
committed
test: fix test in ie11
1 parent e456a5b commit b11b830

File tree

1 file changed

+7
-7
lines changed
  • packages/integration-karma/test/api/CustomElementConstructor-getter

1 file changed

+7
-7
lines changed

packages/integration-karma/test/api/CustomElementConstructor-getter/index.spec.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import LifecycleParent from 'x/lifecycleParent';
77
// constructor.
88
const SUPPORTS_CUSTOM_ELEMENTS = !process.env.COMPAT && 'customElements' in window;
99

10-
it('should return a custom element', () => {
11-
class Test extends LightningElement {}
12-
const TestCustomElement = Test.CustomElementConstructor;
13-
14-
expect(typeof TestCustomElement).toBe('function');
15-
});
16-
1710
it('should throw when trying to claim abstract LightningElement as custom element', () => {
1811
expect(() => LightningElement.CustomElementConstructor).toThrowError(
1912
TypeError,
@@ -22,6 +15,13 @@ it('should throw when trying to claim abstract LightningElement as custom elemen
2215
});
2316

2417
if (SUPPORTS_CUSTOM_ELEMENTS) {
18+
it('should return a custom element', () => {
19+
class Test extends LightningElement {}
20+
const TestCustomElement = Test.CustomElementConstructor;
21+
22+
expect(typeof TestCustomElement).toBe('function');
23+
});
24+
2525
it('should create a custom element with shadow mode set to "open" by default', () => {
2626
class Test extends LightningElement {}
2727

0 commit comments

Comments
 (0)