ts-prime
Version:
A utility library for JavaScript and Typescript.
11 lines (10 loc) • 378 B
JavaScript
import { deepSort } from './deepSort';
describe('deep sort', function () {
test('should return difference', function () {
expect(JSON.stringify(deepSort({
a: [9, 7, 8, 44, { '=': 5, a: 1, q: [7, 1], d: ['q', 'c'] }],
}))).toEqual(JSON.stringify({
a: [44, 7, 8, 9, { '=': 5, a: 1, d: ['c', 'q'], q: [1, 7] }],
}));
});
});