@@ -14,6 +14,7 @@ import {
1414import { TranslateModule } from '@ngx-translate/core' ;
1515import { of } from 'rxjs' ;
1616
17+ import { APP_CONFIG } from '../../../config/app-config.interface' ;
1718import { getBitstreamDownloadRoute } from '../../app-routing-paths' ;
1819import {
1920 SortDirection ,
@@ -52,34 +53,6 @@ import { TruncatablePartComponent } from '../../shared/truncatable/truncatable-p
5253import { FileSizePipe } from '../../shared/utils/file-size-pipe' ;
5354import { LuckySearchService } from '../lucky-search.service' ;
5455import { LuckySearchComponent } from './lucky-search.component' ;
55- import { ComponentFixture , TestBed } from '@angular/core/testing' ;
56-
57- import { LuckySearchComponent } from './lucky-search.component' ;
58- import { LuckySearchService } from '../lucky-search.service' ;
59- import { SearchConfigurationService } from '../../core/shared/search/search-configuration.service' ;
60- import { Router , UrlTree } from '@angular/router' ;
61- import { createSuccessfulRemoteDataObject , createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils' ;
62- import { createPaginatedList } from '../../shared/testing/utils.test' ;
63- import { Item } from '../../core/shared/item.model' ;
64- import { of as observableOf } from 'rxjs' ;
65- import { PaginatedSearchOptions } from '../../shared/search/models/paginated-search-options.model' ;
66- import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model' ;
67- import { SortDirection , SortOptions } from '../../core/cache/models/sort-options.model' ;
68- import { TranslateModule } from '@ngx-translate/core' ;
69- import { By } from '@angular/platform-browser' ;
70- import { SearchResult } from '../../shared/search/models/search-result.model' ;
71- import { DSpaceObject } from '../../core/shared/dspace-object.model' ;
72- import { BitstreamDataService , MetadataFilter } from '../../core/data/bitstream-data.service' ;
73- import { Bitstream } from '../../core/shared/bitstream.model' ;
74- import { RouterMock } from '../../shared/mocks/router.mock' ;
75- import { MetadataMap , MetadataValue } from '../../core/shared/metadata.models' ;
76- import { FileSizePipe } from '../../shared/utils/file-size-pipe' ;
77- import { HardRedirectService } from '../../core/services/hard-redirect.service' ;
78- import { getBitstreamDownloadRoute } from '../../app-routing-paths' ;
79- import { PLATFORM_ID } from '@angular/core' ;
80- import { NotificationsService } from '../../shared/notifications/notifications.service' ;
81- import { NotificationsServiceStub } from '../../shared/testing/notifications-service.stub' ;
82- import { APP_CONFIG } from '../../../config/app-config.interface' ;
8356
8457describe ( 'LuckySearchComponent' , ( ) => {
8558 let fixture : ComponentFixture < LuckySearchComponent > ;
@@ -159,7 +132,7 @@ describe('LuckySearchComponent', () => {
159132 { provide : HardRedirectService , useValue : hardRedirectService } ,
160133 { provide : PLATFORM_ID , useValue : 'browser' } ,
161134 { provide : NotificationsService , useValue : new NotificationsServiceStub ( ) } ,
162- { provide : APP_CONFIG , useValue : { } } ,
135+ { provide : APP_CONFIG , useValue : { } } ,
163136 ] ,
164137 } ) . overrideComponent ( LuckySearchComponent , {
165138 remove : {
@@ -395,11 +368,11 @@ describe('LuckySearchComponent', () => {
395368 // @ts -ignore: Accessing private method for testing
396369 component . appConfig = {
397370 luckySearchRedirects : {
398- default : 301
399- }
371+ default : 301 ,
372+ } ,
400373 } as any ;
401374 // @ts -ignore: Accessing private method for testing
402- component . currentFilter = { identifier : 'unknown' } ;
375+ component . currentFilter = { identifier : 'unknown' } ;
403376
404377 // @ts -ignore: Accessing private method for testing
405378 const result = component . getRedirectCode ( ) ;
@@ -410,10 +383,10 @@ describe('LuckySearchComponent', () => {
410383 it ( 'should return 302 when default is not set and identifier is not found' , ( ) => {
411384 // @ts -ignore: Accessing private method for testing
412385 component . appConfig = {
413- luckySearchRedirects : { }
386+ luckySearchRedirects : { } ,
414387 } as any ;
415388 // @ts -ignore: Accessing private method for testing
416- component . currentFilter = { identifier : 'unknown' } ;
389+ component . currentFilter = { identifier : 'unknown' } ;
417390
418391 // @ts -ignore: Accessing private method for testing
419392 const result = component . getRedirectCode ( ) ;
@@ -425,11 +398,11 @@ describe('LuckySearchComponent', () => {
425398 component . appConfig = {
426399 luckySearchRedirects : {
427400 default : 302 ,
428- 'legacy-id' : 301
429- }
401+ 'legacy-id' : 301 ,
402+ } ,
430403 } ;
431404 // @ts -ignore: Accessing private method for testing
432- component . currentFilter = { identifier : 'legacy-id' } ;
405+ component . currentFilter = { identifier : 'legacy-id' } ;
433406
434407 // @ts -ignore: Accessing private method for testing
435408 const result = component . getRedirectCode ( ) ;
0 commit comments