Skip to content

Commit

Permalink
fix: remove unused tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirvolek committed Aug 30, 2023
1 parent 02c2c75 commit d11ad29
Showing 1 changed file with 0 additions and 59 deletions.
59 changes: 0 additions & 59 deletions test/unit/tests/routes/string-utils.unit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
getEndpointFromUrl,
getAdditionalParametersFromRequest,
sortKeysInObject,
toJSONStream,
} from '../../../../src/utils/string-utils.js';
Expand Down Expand Up @@ -28,64 +27,6 @@ describe('stringUtils', async () => {
expect(getEndpointFromUrl('/pools?order=desc&count=5')).toStrictEqual('pools');
});

test('getAdditionalParametersFromRequest', () => {
expect(getAdditionalParametersFromRequest('1', '2')).toStrictEqual([
'1',
undefined,
'2',
undefined,
]);
expect(getAdditionalParametersFromRequest('1:3', '2')).toStrictEqual([
'1',
'3',
'2',
undefined,
]);
expect(getAdditionalParametersFromRequest('1', '2:4')).toStrictEqual([
'1',
undefined,
'2',
'4',
]);
expect(getAdditionalParametersFromRequest('1:3', '2:4')).toStrictEqual(['1', '3', '2', '4']);
expect(getAdditionalParametersFromRequest('1')).toStrictEqual([
'1',
undefined,
undefined,
undefined,
]);
expect(getAdditionalParametersFromRequest('1:3')).toStrictEqual([
'1',
'3',
undefined,
undefined,
]);
expect(getAdditionalParametersFromRequest(undefined, '2')).toStrictEqual([
undefined,
undefined,
'2',
undefined,
]);
expect(getAdditionalParametersFromRequest(undefined, '2:4')).toStrictEqual([
undefined,
undefined,
'2',
'4',
]);
expect(getAdditionalParametersFromRequest()).toStrictEqual([
undefined,
undefined,
undefined,
undefined,
]);
expect(getAdditionalParametersFromRequest('1:54545454545')).toStrictEqual(
'outOfRangeOrMalformedErr',
);
expect(getAdditionalParametersFromRequest(undefined, '-1:44')).toStrictEqual(
'outOfRangeOrMalformedErr',
);
});

test('sortKeysInObject', () => {
// eslint-disable-next-line unicorn/no-useless-undefined
expect(sortKeysInObject(undefined)).toStrictEqual(undefined);
Expand Down

0 comments on commit d11ad29

Please sign in to comment.