Commit 84a3607 1 parent ec243c2 commit 84a3607 Copy full SHA for 84a3607
File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -234,10 +234,15 @@ export class MockElement extends MockNode {
234
234
attachInternals ( ) : MockElementInternals {
235
235
return new Proxy ( { } as unknown as MockElementInternals , {
236
236
get : function ( _target , prop , _receiver ) {
237
- console . error (
238
- `NOTE: Property ${ String ( prop ) } was accessed on ElementInternals, but this property is not implemented.
239
- Testing components with ElementInternals is fully supported in e2e tests.` ,
240
- ) ;
237
+ /**
238
+ * only print warning when running in a test environment
239
+ */
240
+ if ( 'process' in globalThis && globalThis . process . env . __STENCIL_SPEC_TESTS__ ) {
241
+ console . error (
242
+ `NOTE: Property ${ String ( prop ) } was accessed on ElementInternals, but this property is not implemented.
243
+ Testing components with ElementInternals is fully supported in e2e tests.` ,
244
+ ) ;
245
+ }
241
246
} ,
242
247
} ) ;
243
248
}
You can’t perform that action at this time.
0 commit comments