Skip to content

Commit 04e5a70

Browse files
committed
test(nestjs): fix tests
1 parent 49ab6fb commit 04e5a70

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

apps/nestjs/src/app.controller.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('AppController', () => {
1515
describe('getHello', () => {
1616
it('should return "Hello World!"', () => {
1717
const appController = app.get(AppController);
18-
expect(appController.getHello()).toBe('Hello World!');
18+
expect(appController.getHello()).toEqual({ message: ['Hello World!'] });
1919
});
2020
});
2121
});

apps/nestjs/test/app.e2e-spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ describe('AppController (e2e)', () => {
2222

2323
it('/ (GET)', () => {
2424
expect(1).toBe(1);
25-
return request(app.getHttpServer()).get('/').expect(200).expect('Hello World!');
25+
return request(app.getHttpServer())
26+
.get('/')
27+
.expect(200)
28+
.expect({ message: ['Hello World!'] });
2629
});
2730
});

apps/nestjs/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"baseUrl": "./",
1313
"incremental": true,
1414
"forceConsistentCasingInFileNames": true,
15-
"skipLibCheck": true
15+
"skipLibCheck": true,
16+
"allowJs": true
1617
}
1718
}

0 commit comments

Comments
 (0)