2020-11-25 09:00:20 +01:00
|
|
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
|
|
|
2021-02-17 13:49:04 +01:00
|
|
|
import { TokenDetailsComponent } from '@pages/tokens/token-details/token-details.component';
|
2021-05-10 18:15:25 +02:00
|
|
|
import {
|
|
|
|
ActivatedRouteStub,
|
|
|
|
FooterStubComponent,
|
|
|
|
SidebarStubComponent,
|
|
|
|
TokenServiceStub,
|
|
|
|
TopbarStubComponent,
|
|
|
|
} from '@src/testing';
|
|
|
|
import { ActivatedRoute } from '@angular/router';
|
|
|
|
import { TokenService } from '@app/_services';
|
|
|
|
import { TokensModule } from '@pages/tokens/tokens.module';
|
|
|
|
import { AppModule } from '@app/app.module';
|
2020-11-25 09:00:20 +01:00
|
|
|
|
|
|
|
describe('TokenDetailsComponent', () => {
|
|
|
|
let component: TokenDetailsComponent;
|
|
|
|
let fixture: ComponentFixture<TokenDetailsComponent>;
|
|
|
|
let route: ActivatedRouteStub;
|
|
|
|
|
|
|
|
beforeEach(async () => {
|
|
|
|
route = new ActivatedRouteStub();
|
|
|
|
route.setParamMap({ id: 'test' });
|
|
|
|
await TestBed.configureTestingModule({
|
|
|
|
declarations: [
|
|
|
|
TokenDetailsComponent,
|
|
|
|
FooterStubComponent,
|
|
|
|
SidebarStubComponent,
|
2021-05-10 18:15:25 +02:00
|
|
|
TopbarStubComponent,
|
2020-11-25 09:00:20 +01:00
|
|
|
],
|
|
|
|
providers: [
|
|
|
|
{ provide: ActivatedRoute, useValue: route },
|
2021-05-10 18:15:25 +02:00
|
|
|
{ provide: TokenService, useClass: TokenServiceStub },
|
2020-11-25 09:00:20 +01:00
|
|
|
],
|
2021-05-10 18:15:25 +02:00
|
|
|
imports: [AppModule, TokensModule],
|
|
|
|
}).compileComponents();
|
2020-11-25 09:00:20 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
fixture = TestBed.createComponent(TokenDetailsComponent);
|
|
|
|
component = fixture.componentInstance;
|
|
|
|
fixture.detectChanges();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should create', () => {
|
|
|
|
expect(component).toBeTruthy();
|
|
|
|
});
|
|
|
|
});
|