File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
packages/integration-karma/test/api/CustomElementConstructor-getter Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,6 @@ import LifecycleParent from 'x/lifecycleParent';
77// constructor.
88const 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-
1710it ( '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
2417if ( 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
You can’t perform that action at this time.
0 commit comments