mirror of
https://github.com/dzeiocom/libs.git
synced 2025-06-12 19:09:18 +00:00
Added addional tests
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
@ -96,6 +96,21 @@ describe('Object sort Tests', () => {
|
||||
d: 'fourth'
|
||||
})
|
||||
})
|
||||
it('should sort by the specified key', () => {
|
||||
const obj = {
|
||||
b: 'first',
|
||||
a: 'second',
|
||||
c: 'zero',
|
||||
d: 'fourth'
|
||||
}
|
||||
// @ts-expect-error
|
||||
expect(objectSort(obj, ['c', 'a', 'e'])).toEqual({
|
||||
c: 'zero',
|
||||
a: 'second',
|
||||
b: 'first',
|
||||
d: 'fourth'
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('Object Clone Tests', () => {
|
||||
|
Reference in New Issue
Block a user