Skip to content

Commit a21dac1

Browse files
committed
chore: make typescript happy
1 parent 895ba87 commit a21dac1

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

examples/openapi-ts-fastify/test/pets.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ describe('/pet/findByTags', () => {
2626
petId: '123',
2727
},
2828
});
29-
expect(result.response.status).toBe(200);
29+
expect(result.response!.status).toBe(200);
3030
});
3131
});

examples/openapi-ts-nestjs/test/pets.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ afterAll(async () => {
2828
describe('PetsController', () => {
2929
test('listPets', async () => {
3030
const result = await listPets({ client });
31-
expect(result.response.status).toBe(200);
31+
expect(result.response!.status).toBe(200);
3232
expect(Array.isArray(result.data)).toBe(true);
3333
});
3434

@@ -37,22 +37,22 @@ describe('PetsController', () => {
3737
client,
3838
path: { petId: '1' },
3939
});
40-
expect(result.response.status).toBe(200);
40+
expect(result.response!.status).toBe(200);
4141
});
4242

4343
test('createPet', async () => {
4444
const result = await createPet({
4545
body: { name: 'Buddy' },
4646
client,
4747
});
48-
expect(result.response.status).toBe(201);
48+
expect(result.response!.status).toBe(201);
4949
expect(result.data).toMatchObject({ name: 'Buddy' });
5050
});
5151
});
5252

5353
describe('StoreController', () => {
5454
test('getInventory', async () => {
5555
const result = await getInventory({ client });
56-
expect(result.response.status).toBe(200);
56+
expect(result.response!.status).toBe(200);
5757
});
5858
});

0 commit comments

Comments
 (0)