When importing Storage from @ionic/storage-angular the following error appears running unit tests with Jest:
ā Test suite failed to run
TypeError: Object prototype may only be an Object or null: undefined
at setPrototypeOf (<anonymous>)
2 | import { StatusBar } from '@ionic-native/status-bar/ngx';
3 | import { Platform } from '@ionic/angular';
> 4 | import { Storage } from '@ionic/storage-angular';
| ^
5 | import { ThemeService } from '@ivt/u-ui';
6 | import { createComponentFactory, Spectator } from '@ngneat/spectator';
7 | import { provideMockStore } from '@ngrx/store/testing';
at extendStatics (../../node_modules/@ionic/storage-angular/bundles/ionic-storage-angular.umd.js:27:16)
at __extends (../../node_modules/@ionic/storage-angular/bundles/ionic-storage-angular.umd.js:31:9)
at ../../node_modules/@ionic/storage-angular/bundles/ionic-storage-angular.umd.js:228:9
at ../../node_modules/@ionic/storage-angular/bundles/ionic-storage-angular.umd.js:290:6
at ../../node_modules/@ionic/storage-angular/bundles/ionic-storage-angular.umd.js:2:68
at Object.<anonymous> (../../node_modules/@ionic/storage-angular/bundles/ionic-storage-angular.umd.js:5:2)
at Object.<anonymous> (src/app/app.component.spec.ts:4:1)
To reproduce this issue you'll need to add this to your jest.preset
When importing Storage from @ionic/storage-angular the following error appears running unit tests with Jest:
To reproduce this issue you'll need to add this to your jest.preset
Also this configuration is needed on your tsconfig.spec.ts compiler options
It would be great if this can be fixed! Thanks guys š