I'm running a unit test that makes a simple http call
karma.config.js, test.ts, tsconfig.js are all virgin boilerplate ng CLI 5.2.3, node, webpack and ts all latest versions. karma-webpack not used
The httpclient get call generates this error but only when run as a specified test in karma/jasmine/webpack:
TypeError: this.handler.handle is not a function at MergeMapSubscriber.WEBPACK_IMPORTED_MODULE_2_rxjs_operator_concatMap.a.call [as project] (:9876/_karma_webpack_/webpack:/C:/Users/sauna/Documents/adev/UK/node_modules/@angular/common/esm2015/http.js:1174) at MergeMapSubscriber._tryNext (:9876/_karma_webpack_/webpack:/C:/Users/sauna/Documents/adev/UK/node_modules/rxjs/_esm2015/operators/m
This is the test specification that makes the http call as part of an an integration suite:
httpClientInstance.get('myAPIurlReturningAJsonObj').subscribe(
(data) => {
testID = data.MessageText;
},
(error) => {
console.log(error);
}
);
..expectation is any string to testID
the error is something with the Observable presented by ng not being handled by Jasmine
ping me I need to present more information, thx