Skip to content

Commit

Permalink
Fix frontend test imports
Browse files Browse the repository at this point in the history
  • Loading branch information
JeltevanBoheemen committed Oct 3, 2024
1 parent b8e190b commit ecb814d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { TestBed } from '@angular/core/testing';

import { CorpusDefinitionService } from './corpus-definition.service';
import { SlugifyPipe } from '@shared/pipes/slugify.pipe';

describe('CorpusDefinitionService', () => {
let service: CorpusDefinitionService;

beforeEach(() => {
TestBed.configureTestingModule({
providers: [CorpusDefinitionService],
providers: [CorpusDefinitionService, SlugifyPipe],
});
service = TestBed.inject(CorpusDefinitionService);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CorpusFormComponent } from './corpus-form.component';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { SlugifyPipe } from '@shared/pipes/slugify.pipe';

describe('CorpusFormComponent', () => {
let component: CorpusFormComponent;
Expand All @@ -12,6 +13,7 @@ describe('CorpusFormComponent', () => {
await TestBed.configureTestingModule({
declarations: [CorpusFormComponent],
imports: [HttpClientTestingModule, RouterTestingModule],
providers: [SlugifyPipe],
}).compileComponents();

fixture = TestBed.createComponent(CorpusFormComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';

import { MetaFormComponent } from './meta-form.component';
import { CorpusDefinitionService } from 'app/corpus-definitions/corpus-definition.service';
import { SlugifyPipe } from '@shared/pipes/slugify.pipe';

describe('MetaFormComponent', () => {
let component: MetaFormComponent;
let fixture: ComponentFixture<MetaFormComponent>;
let component: MetaFormComponent;
let fixture: ComponentFixture<MetaFormComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [MetaFormComponent],
providers: [CorpusDefinitionService],
}).compileComponents();
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [MetaFormComponent],
providers: [CorpusDefinitionService, SlugifyPipe],
}).compileComponents();

fixture = TestBed.createComponent(MetaFormComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
fixture = TestBed.createComponent(MetaFormComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { UploadSampleComponent } from './upload-sample.component';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { CorpusDefinitionService } from 'app/corpus-definitions/corpus-definition.service';
import { SlugifyPipe } from '@shared/pipes/slugify.pipe';

describe('UploadSampleComponent', () => {
let component: UploadSampleComponent;
let fixture: ComponentFixture<UploadSampleComponent>;
let component: UploadSampleComponent;
let fixture: ComponentFixture<UploadSampleComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [UploadSampleComponent]
})
.compileComponents();

fixture = TestBed.createComponent(UploadSampleComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [UploadSampleComponent],
imports: [HttpClientTestingModule],
providers: [CorpusDefinitionService, SlugifyPipe],
}).compileComponents();

it('should create', () => {
expect(component).toBeTruthy();
});
fixture = TestBed.createComponent(UploadSampleComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

0 comments on commit ecb814d

Please sign in to comment.