Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit c3acff1

Browse files
committed
Update compare function in stable-json-stringify test
1 parent ecd709d commit c3acff1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

__tests__/stable-json-stringify.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ describe('Property names are correctly sorted when serializing an object', () =>
192192
});
193193

194194
test('with a custom compare function', () => {
195-
const compareFn = ([a]: [string, any], [b]: [string, any]) => b.localeCompare(a);
195+
const compareFn = (a: string, b: string) => b.localeCompare(a);
196196
const expectedOutput = '{"c":1,"b":3,"a":2}';
197197
const output = stableJsonStringify({ c: 1, a: 2, b: 3 }, compareFn);
198198
expect(output).toEqual(expectedOutput);

0 commit comments

Comments
 (0)