Last change
on this file was baf4cc4, checked in by ppaunovski <paunovskipavel@…>, 3 months ago |
split group project and individual project into two separate folders
|
-
Property mode
set to
100644
|
File size:
949 bytes
|
Line | |
---|
1 | import { TestBed } from '@angular/core/testing';
|
---|
2 | import { AppComponent } from './app.component';
|
---|
3 |
|
---|
4 | describe('AppComponent', () => {
|
---|
5 | beforeEach(async () => {
|
---|
6 | await TestBed.configureTestingModule({
|
---|
7 | imports: [AppComponent],
|
---|
8 | }).compileComponents();
|
---|
9 | });
|
---|
10 |
|
---|
11 | it('should create the app', () => {
|
---|
12 | const fixture = TestBed.createComponent(AppComponent);
|
---|
13 | const app = fixture.componentInstance;
|
---|
14 | expect(app).toBeTruthy();
|
---|
15 | });
|
---|
16 |
|
---|
17 | it(`should have the 'bus-n-go-frontend' title`, () => {
|
---|
18 | const fixture = TestBed.createComponent(AppComponent);
|
---|
19 | const app = fixture.componentInstance;
|
---|
20 | expect(app.title).toEqual('bus-n-go-frontend');
|
---|
21 | });
|
---|
22 |
|
---|
23 | it('should render title', () => {
|
---|
24 | const fixture = TestBed.createComponent(AppComponent);
|
---|
25 | fixture.detectChanges();
|
---|
26 | const compiled = fixture.nativeElement as HTMLElement;
|
---|
27 | expect(compiled.querySelector('h1')?.textContent).toContain('Hello, bus-n-go-frontend');
|
---|
28 | });
|
---|
29 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.