Files
front/src/app/app.spec.ts
T
2026-09-29 01:55:20 +03:00

37 lines
1.2 KiB
TypeScript

import { TestBed } from '@angular/core/testing';
import { provideRouter } from '@angular/router';
import { provideServiceWorker } from '@angular/service-worker';
import { provideEffects } from '@ngrx/effects';
import { provideState, provideStore } from '@ngrx/store';
import { App } from './app';
import { GorodarEffects, gorodarFeature } from './state';
describe('App', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [App],
providers: [
provideRouter([]),
provideStore(),
provideState(gorodarFeature),
provideEffects(GorodarEffects),
provideServiceWorker('ngsw-worker.js', { enabled: false }),
],
}).compileComponents();
});
it('should create the app', () => {
const fixture = TestBed.createComponent(App);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it('should render bottom navigation', () => {
const fixture = TestBed.createComponent(App);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('app-bottom-nav')?.textContent).toContain('Города');
});
});