Skip to content

Commit

Permalink
fix course-competencies-relation-modal.component.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ole-ve committed Jan 11, 2025
1 parent 1537ca0 commit 367eb0e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('CourseCompetenciesRelationModalComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [CourseCompetenciesRelationModalComponent, NoopAnimationsModule],
imports: [NoopAnimationsModule],
providers: [
provideHttpClient(),
provideHttpClientTesting(),
Expand Down Expand Up @@ -116,9 +116,11 @@ describe('CourseCompetenciesRelationModalComponent', () => {
expect(closeSpy).toHaveBeenCalledOnce();
});

it('should call selectCourseCompetency on courseCompetencyRelationFormComponent with valid courseCompetencyId', () => {
it('should call selectCourseCompetency on courseCompetencyRelationFormComponent with valid courseCompetencyId', async () => {
fixture.detectChanges();
await fixture.whenStable();

fixture.detectChanges(); // required as the viewChild is only available after effect() has run (-> second update)
const courseCompetencyId = 1;
const selectSpy = jest.spyOn(component['courseCompetencyRelationFormComponent'](), 'selectCourseCompetency');

Expand Down

0 comments on commit 367eb0e

Please sign in to comment.