Files
pezkuwi-common/packages/util/src/u8a/sorted.spec.ts
T
pezkuwichain a5542fdd87 Rebrand: polkadot → pezkuwi internal references fixed
- Fixed internal @polkadot references to @pezkuwi
- Updated hw-ledger and hw-ledger-transports packages
- Updated keyring and networks packages
- Version 14.0.7
2026-01-07 02:34:39 +03:00

21 lines
801 B
TypeScript

// Copyright 2017-2025 @pezkuwi/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
/// <reference types="@pezkuwi/dev-test/globals.d.ts" />
import { u8aSorted } from './index.js';
describe('u8aSorted', (): void => {
it('sorts a simple set of u8a', (): void => {
expect(
u8aSorted([new Uint8Array([1, 2, 3]), new Uint8Array([4, 5, 6]), new Uint8Array([2, 3, 4])])
).toEqual([new Uint8Array([1, 2, 3]), new Uint8Array([2, 3, 4]), new Uint8Array([4, 5, 6])]);
});
it('sorts a simple set of u8a (not the same lengths)', (): void => {
expect(
u8aSorted([new Uint8Array([1, 2, 3, 4]), new Uint8Array([4, 5, 6]), new Uint8Array([1, 2, 3, 5])])
).toEqual([new Uint8Array([1, 2, 3, 4]), new Uint8Array([1, 2, 3, 5]), new Uint8Array([4, 5, 6])]);
});
});