mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
fix bitstream list item test
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
import {RouterTestingModule} from '@angular/router/testing';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {SharedModule} from '../../shared.module';
|
||||
|
||||
import { BitstreamListItemComponent } from './bitstream-list-item.component';
|
||||
import {BitstreamListItemComponent} from './bitstream-list-item.component';
|
||||
import {DSONameService} from '../../../core/breadcrumbs/dso-name.service';
|
||||
import {DSONameServiceMock} from '../../mocks/dso-name.service.mock';
|
||||
|
||||
describe('BitstreamListItemComponent', () => {
|
||||
let component: BitstreamListItemComponent;
|
||||
@@ -8,7 +14,9 @@ describe('BitstreamListItemComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ BitstreamListItemComponent ]
|
||||
declarations: [ BitstreamListItemComponent ],
|
||||
imports: [ CommonModule, SharedModule, TranslateModule, RouterTestingModule ],
|
||||
providers: [{ provide: DSONameService, useValue: new DSONameServiceMock() }]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
@@ -16,6 +24,8 @@ describe('BitstreamListItemComponent', () => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(BitstreamListItemComponent);
|
||||
component = fixture.componentInstance;
|
||||
// @ts-ignore
|
||||
component.object = {name: 'test'};
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user