From fc88eb0c97549cf3dc23dd8cc399bc980081540d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Aug 2020 10:06:04 +0100 Subject: [PATCH] Bump prettier from 2.0.5 to 2.1.0 (#1632) * Bump prettier from 2.0.5 to 2.1.0 Bumps [prettier](https://github.com/prettier/prettier) from 2.0.5 to 2.1.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.0.5...2.1.0) Signed-off-by: dependabot[bot] * fix lint Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Denys Vuika --- package-lock.json | 6 ++--- package.json | 2 +- .../library-favorite.directive.spec.ts | 22 ++++++++----------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 41a97f3b2..0dd5f028a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13614,9 +13614,9 @@ "dev": true }, "prettier": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz", - "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.0.tgz", + "integrity": "sha512-lz28cCbA1cDFHVuY8vvj6QuqOwIpyIfPUYkSl8AZ/vxH8qBXMMjE2knfLHCrZCmUsK/H1bg1P0tOo0dJkTJHvw==", "dev": true }, "process": { diff --git a/package.json b/package.json index a315603c1..e5ec11c67 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "lint-staged": "^10.2.11", "ng-packagr": "^10.0.4", "node-stream-zip": "^1.11.3", - "prettier": "^2.0.5", + "prettier": "^2.1.0", "protractor": "^7.0.0", "protractor-retry": "^1.2.13", "protractor-smartrunner": "^0.1.1", diff --git a/src/app/directives/library-favorite.directive.spec.ts b/src/app/directives/library-favorite.directive.spec.ts index bc6f9635e..75407f15e 100644 --- a/src/app/directives/library-favorite.directive.spec.ts +++ b/src/app/directives/library-favorite.directive.spec.ts @@ -26,16 +26,12 @@ import { Component, ViewChild } from '@angular/core'; import { LibraryFavoriteDirective } from './library-favorite.directive'; import { AlfrescoApiService, AlfrescoApiServiceMock, setupTestBed, CoreModule } from '@alfresco/adf-core'; -import { TestBed, async } from '@angular/core/testing'; +import { TestBed, async, ComponentFixture } from '@angular/core/testing'; import { TranslateModule } from '@ngx-translate/core'; @Component({ selector: 'app-test-component', - template: ` - - ` + template: ` ` }) class TestComponent { @ViewChild('favoriteLibrary') @@ -45,10 +41,10 @@ class TestComponent { } describe('LibraryFavoriteDirective', () => { - let fixture; - let api; - let component; - let selection; + let fixture: ComponentFixture; + let api: AlfrescoApiService; + let component: TestComponent; + let selection: { entry: { guid: string; id: string } }; setupTestBed({ imports: [TranslateModule.forRoot(), CoreModule.forRoot()], @@ -76,7 +72,7 @@ describe('LibraryFavoriteDirective', () => { }); it('should mark selection as favorite when getFavoriteSite returns successfully', async(() => { - spyOn(api.peopleApi, 'getFavoriteSite').and.returnValue(Promise.resolve()); + spyOn(api.peopleApi, 'getFavoriteSite').and.returnValue(Promise.resolve(null)); component.selection = selection; fixture.detectChanges(); @@ -99,7 +95,7 @@ describe('LibraryFavoriteDirective', () => { it('should call addFavorite() on click event when selection is not a favorite', async(() => { spyOn(api.peopleApi, 'getFavoriteSite').and.returnValue(Promise.reject()); - spyOn(api.peopleApi, 'addFavorite').and.returnValue(Promise.resolve()); + spyOn(api.peopleApi, 'addFavorite').and.returnValue(Promise.resolve(null)); component.selection = selection; fixture.detectChanges(); @@ -115,7 +111,7 @@ describe('LibraryFavoriteDirective', () => { })); it('should call removeFavoriteSite() on click event when selection is not a favorite', async(() => { - spyOn(api.peopleApi, 'getFavoriteSite').and.returnValue(Promise.resolve()); + spyOn(api.peopleApi, 'getFavoriteSite').and.returnValue(Promise.resolve(null)); spyOn(api.favoritesApi, 'removeFavoriteSite').and.returnValue(Promise.resolve()); component.selection = selection; fixture.detectChanges();