The library doesn't pass through Jest unit test. On debug it is observed that
NativeEventSource is undefined. Since the Jest runs on terminal NativeEventSource is undefined.
var R = NativeEventSource if (XMLHttpRequest != undefined && (NativeEventSource == undefined || !("withCredentials" in NativeEventSource.prototype))) {
I've tried multiple ways, but couldn't find any solution.
I'm currently using
angular: 12.2.0
"jest": "^27.0.3",
"jest-junit": "^11.1.0",
"jest-preset-angular": "9.0.0",
"jest-zone-patch": "~0.0.10",