Files
common/packages/util/src/compact/stripLength.spec.ts
T
2022-01-01 09:26:11 +02:00

16 lines
392 B
TypeScript

// Copyright 2017-2022 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { compactStripLength } from '.';
describe('compactStripLength', (): void => {
it('correctly removes the length prefix', (): void => {
expect(
compactStripLength(Uint8Array.from([2 << 2, 12, 13]))
).toEqual([
3,
Uint8Array.from([12, 13])
]);
});
});