Skip to content

Commit 2ee70b5

Browse files
Tony133jmcdo29
authored andcommitted
test(http-sample): update type in cats.service.spec.ts
1 parent 1241938 commit 2ee70b5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/http-sample/src/cats/cats.service.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,17 @@ describe('CatsService', () => {
136136
breed: 'Russian',
137137
};
138138

139-
const response: AxiosResponse<any> | any = {
139+
const response: AxiosResponse<any> = {
140140
data,
141141
headers: {},
142142
config: { url: 'http://localhost:3000/mockUrl' },
143143
status: 201,
144144
statusText: 'OK',
145145
};
146146

147-
jest.spyOn(httpService, 'post').mockImplementation(() => of(response));
147+
jest
148+
.spyOn(httpService, 'post')
149+
.mockImplementation(() => of(response as any));
148150

149151
service.create(createCatDto).subscribe({
150152
next: (val) => {

0 commit comments

Comments
 (0)