Skip to content

Commit 5b71601

Browse files
committed
fix some testing and linting (not all)
1 parent e609a3c commit 5b71601

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

libs/backend/test/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"name": "@backend/test",
33
"version": "0.0.1",
44
"dependencies": {
5-
"tslib": "^2.3.0"
5+
"tslib": "^2.3.0",
6+
"@nestjs/common": "^10.3.8",
7+
"express": "~4.19.2"
68
},
79
"type": "commonjs",
810
"main": "./src/index.js",

libs/frontend/root/src/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1>Test</h1>
1+
<h1>Welcome app</h1>
22

33
{{ movie() | json }}
44

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
1+
import { provideHttpClient, withFetch } from '@angular/common/http';
12
import { TestBed } from '@angular/core/testing';
23
import { AppComponent } from './app.component';
3-
import { NxWelcomeComponent } from './nx-welcome.component';
4-
import { RouterTestingModule } from '@angular/router/testing';
54

65
describe('AppComponent', () => {
76
beforeEach(async () => {
87
await TestBed.configureTestingModule({
9-
imports: [AppComponent, NxWelcomeComponent, RouterTestingModule],
8+
providers: [provideHttpClient()],
9+
imports: [AppComponent],
1010
}).compileComponents();
1111
});
1212

1313
it('should render title', () => {
1414
const fixture = TestBed.createComponent(AppComponent);
1515
fixture.detectChanges();
1616
const compiled = fixture.nativeElement as HTMLElement;
17-
expect(compiled.querySelector('h1')?.textContent).toContain(
18-
'Welcome app'
19-
);
20-
});
21-
22-
it(`should have as title 'app'`, () => {
23-
const fixture = TestBed.createComponent(AppComponent);
24-
const app = fixture.componentInstance;
25-
expect(app.title).toEqual('app');
17+
expect(compiled.querySelector('h1')?.textContent).toContain('Welcome app');
2618
});
2719
});

0 commit comments

Comments
 (0)