build: upgrade to angular v12

This commit is contained in:
Jovan Krunić
2021-09-21 06:51:33 +00:00
parent e5c227073a
commit 3c7ada4eea
33 changed files with 8960 additions and 8806 deletions

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {NgModule} from '@angular/core';
import {IonicStorageModule} from '@ionic/storage';
import {IonicStorageModule} from '@ionic/storage-angular';
import {StorageProvider} from './storage.provider';
/**

View File

@@ -48,10 +48,10 @@ describe('StorageProvider', () => {
});
it('should call ready method of storage on init', () => {
spyOn(storage, 'ready');
spyOn(storage, 'create');
storageProvider.init();
expect(storage.ready).toHaveBeenCalled();
expect(storage.create).toHaveBeenCalled();
});
it('should call set method of storage to put a value', () => {

View File

@@ -102,8 +102,8 @@ export class StorageProvider {
/**
* Initializes the storage (waits until it's ready)
*/
async init(): Promise<any> {
return this.storage.ready();
async init(): Promise<void> {
await this.storage.create();
}
/**