Warning, /firebird/firebird-ng/src/app/app.component.spec.ts is written in an unsupported language. File is not indexed.
0001 import { TestBed } from '@angular/core/testing';
0002 import { AppComponent } from './app.component';
0003 import {provideRouter} from '@angular/router';
0004 import {Component, NO_ERRORS_SCHEMA} from "@angular/core";
0005
0006 // Mock the external component
0007 @Component({
0008 selector: 'lib-view-options', // Replace with the actual selector
0009 template: '',
0010 })
0011 class MockViewOptionsComponent {}
0012
0013 describe('AppComponent', () => {
0014 beforeEach(async () => {
0015 await TestBed.configureTestingModule({
0016 imports: [AppComponent],
0017 declarations: [MockViewOptionsComponent],
0018 providers: [provideRouter([])],
0019 schemas: [NO_ERRORS_SCHEMA]
0020 }).compileComponents();
0021 });
0022
0023 it('should create the app', () => {
0024 const fixture = TestBed.createComponent(AppComponent);
0025 fixture.detectChanges();
0026 const app = fixture.componentInstance;
0027 expect(app).toBeTruthy();
0028 });
0029
0030 it(`should have the 'firebird' title`, () => {
0031 const fixture = TestBed.createComponent(AppComponent);
0032 fixture.detectChanges();
0033 const app = fixture.componentInstance;
0034 expect(app.title).toEqual('Firebird');
0035 });
0036
0037 // it('should render title', () => {
0038 // const fixture = TestBed.createComponent(AppComponent);
0039 // fixture.detectChanges();
0040 // const compiled = fixture.nativeElement as HTMLElement;
0041 // expect(compiled.querySelector('h1')?.textContent).toContain('Hello, firebird');
0042 // });
0043 });