unit tests
This commit is contained in:
@@ -1,22 +1,14 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
import { provideHttpClient } from '@angular/common/http';
|
||||
import { describe, it, expect, beforeEach } from 'vitest';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [AppComponent],
|
||||
providers: [
|
||||
provideHttpClient(),
|
||||
provideHttpClient(),
|
||||
]
|
||||
}).compileComponents();
|
||||
describe('MathService', () => {
|
||||
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
});
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
it('should add two numbers', () => {
|
||||
expect(5).toEqual(5)
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user