Skip to content

Commit ee7051f

Browse files
committed
tests: remove array + empty body tests that were express-specific
1 parent b67f88e commit ee7051f

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

tests/request.test.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,6 @@ describe('GET requests', () => {
4646
expect(res).toMatchObject({ code: 400, json: { error: "Cannot echo 'echo'!" } });
4747
});
4848

49-
test('GET request with array of one number', () => {
50-
const value = [1];
51-
const res = wrapperRequest('GET', `${SERVER_URL}/get`, { qs: { value } });
52-
expect(res).toMatchObject({ code: 200, json: { value: ['1'] } });
53-
});
54-
55-
test('GET request with array of numbers', () => {
56-
const value = [1, 2, 3];
57-
const res = wrapperRequest('GET', `${SERVER_URL}/get`, { qs: { value } });
58-
expect(res).toMatchObject({ code: 200, json: { value: ['1', '2', '3'] } });
59-
});
60-
6149
test('GET request with empty array', () => {
6250
const value: string[] = [];
6351
const res = wrapperRequest('GET', `${SERVER_URL}/get`, { qs: { value } });
@@ -210,8 +198,8 @@ describe('Body (instead of JSON)', () => {
210198
expect(res).toMatchObject({ code: 200, json: { value: value.value } });
211199
});
212200

213-
test('Empty body', () => {
214-
const res = wrapperRequest('PUT', `${SERVER_URL}/put`, { body: '' });
201+
test('PUT request empty json', () => {
202+
const res = wrapperRequest('PUT', `${SERVER_URL}/put`, { json: {} });
215203
expect(res).toMatchObject({ code: 200, json: {} });
216204
});
217205
});

0 commit comments

Comments
 (0)