mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
|
|
import { CommentsListComponent } from './comments-list.component';
|
|
import { FormsModule } from '@angular/forms';
|
|
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
|
import { BrowserModule } from '@angular/platform-browser';
|
|
import { CommonModule } from '@angular/common';
|
|
import { ConfirmationService, MessageService } from 'primeng';
|
|
import { Router } from '@angular/router';
|
|
import { ConfigService } from '../../../services/config.service';
|
|
|
|
const routerSpy = jest.fn({ navigateByUrl: jest.fn() });
|
|
|
|
describe('CommentsListComponent', () => {
|
|
let component: CommentsListComponent;
|
|
let fixture: ComponentFixture<CommentsListComponent>;
|
|
|
|
beforeEach(async(() => {
|
|
TestBed.configureTestingModule({
|
|
imports: [FormsModule, BrowserModule, CommonModule, HttpClientModule],
|
|
declarations: [CommentsListComponent],
|
|
providers: [
|
|
HttpClient,
|
|
MessageService,
|
|
ConfirmationService,
|
|
ConfigService,
|
|
{ provide: Router, useValue: routerSpy },
|
|
],
|
|
}).compileComponents();
|
|
}));
|
|
|
|
beforeEach(() => {
|
|
fixture = TestBed.createComponent(CommentsListComponent);
|
|
component = fixture.componentInstance;
|
|
fixture.detectChanges();
|
|
});
|
|
|
|
it('should create', () => {
|
|
expect(component).toBeTruthy();
|
|
});
|
|
});
|