mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-24 22:57:58 +00:00
a5542fdd87
- Fixed internal @polkadot references to @pezkuwi - Updated hw-ledger and hw-ledger-transports packages - Updated keyring and networks packages - Version 14.0.7
21 lines
801 B
TypeScript
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])]);
|
|
});
|
|
});
|