Skip to content

Commit

Permalink
added one test on jest
Browse files Browse the repository at this point in the history
  • Loading branch information
CrackerakiUA committed Feb 1, 2025
1 parent 90a1b7b commit 98b0d76
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
5 changes: 2 additions & 3 deletions client/setup-jest.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

import 'jest-preset-angular/setup-jest';

import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
setupZoneTestEnv();
18 changes: 18 additions & 0 deletions client/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';

describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [RouterTestingModule],
declarations: [AppComponent]
}).compileComponents();
});

it('should create the component', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
});

0 comments on commit 98b0d76

Please # to comment.