build: update dependencies

Additionally adjust the code after the latest
rebase.
This commit is contained in:
Jovan Krunić
2019-04-08 11:28:43 +02:00
parent 3e697b17b4
commit 75ca8c8a73
10 changed files with 566 additions and 561 deletions

View File

@@ -85,7 +85,7 @@ describe('DataProvider', () => {
});
it('should provide backend data items using search query', async () => {
spyOn(Client.prototype, 'search').and.callFake(() => {
spyOn(Client.prototype as any, 'search').and.callFake(() => {
return {
then: (callback: any) => {
return callback(sampleResponse);
@@ -98,7 +98,7 @@ describe('DataProvider', () => {
it('should put an data item into the local database (storage)', async () => {
let providedThing: SCSaveableThing<SCThing>;
spyOn(storageProvider, 'put').and.callFake((_id: any, thing: any) => {
spyOn(storageProvider, 'put' as any).and.callFake((_id: any, thing: any) => {
providedThing = thing;
providedThing.origin.created = sampleSavable.origin.created;
});
@@ -131,7 +131,7 @@ describe('DataProvider', () => {
});
it('should provide single data from the backend', async () => {
spyOn(Client.prototype, 'getThing').and.callFake(() => {
spyOn(Client.prototype, 'getThing' as any).and.callFake(() => {
return {
then: (callback: any) => {
return callback(sampleThing);
@@ -145,14 +145,14 @@ describe('DataProvider', () => {
});
it('should get an item from both local and remote database', async () => {
spyOn(Client.prototype, 'getThing').and.callFake(() => {
spyOn(Client.prototype, 'getThing' as any).and.callFake(() => {
return {
then: (callback: any) => {
return callback(sampleThing);
},
};
});
spyOn(storageProvider, 'get').and.callFake(() => {
spyOn(storageProvider, 'get' as any).and.callFake(() => {
return {
then: (callback: any) => {
return callback(sampleSavable);

View File

@@ -61,7 +61,7 @@ describe('DataDetailComponent', () => {
beforeEach(async () => {
dataProvider = TestBed.get(DataProvider);
refresher = jasmine.createSpyObj('refresher', ['complete']);
spyOn(dataProvider, 'get').and.returnValue(Promise.resolve(sampleThing));
spyOn(dataProvider, 'get' as any).and.returnValue(Promise.resolve(sampleThing));
spyOn(DataDetailComponent.prototype, 'getItem').and.callThrough();
fixture = await TestBed.createComponent(DataDetailComponent);
comp = fixture.componentInstance;