I constantly get exceptions in my unit tests, if the component uses ion-radio:
ERROR: TypeError: config.get is not a function
TypeError: config.get is not a function
at addEventListener (http://localhost:9877/_karma_webpack_/webpack:/node_modules/@ionic/core/dist/esm/helpers-dd7e4b7b.js:49:1)
at Radio.connectedCallback (http://localhost:9877/_karma_webpack_/webpack:/node_modules/@ionic/core/dist/esm/ion-radio_2.entry.js:64:23)
at safeCall (http://localhost:9877/_karma_webpack_/webpack:/node_modules/@ionic/core/dist/esm/index-7a8b7a1c.js:1262:1)
The strange thing is, that these exceptions occur as soon as there is more than one test in a spec.ts file, but even if these tests are empty:
Yup. I’m also seeing broken Karma testing with the same error message during testing that says
ERROR: TypeError: config.get is not a function
TypeError: config.get is not a function
at removeEventListener (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@ionic/core/dist/esm/helpers-dd7e4b7b.js:65:1)
at SegmentButton.disconnectedCallback (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@ionic/core/dist/esm/ion-segment_2.entry.js:382:26)
at safeCall (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@ionic/core/dist/esm/index-7a8b7a1c.js:1262:1)
at disconnectedCallback (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@ionic/core/dist/esm/index-7a8b7a1c.js:1791:1)
at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@ionic/core/dist/esm/index-7a8b7a1c.js:1882:1
at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone.js:400:1)
at ProxyZoneSpec.push.93775.ProxyZoneSpec.onInvoke (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-testing.js:301:1)
at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone.js:399:1)
at Zone.run (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone.js:160:1)
at NgZone.runOutsideAngular (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:28604:1), undefined