* Bump dev * Adjust dev/node/test/node.d.ts imports * Adjust extensionless import * Additional adjustments
27 lines
710 B
TypeScript
27 lines
710 B
TypeScript
// Copyright 2017-2023 @polkadot/util-crypto authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
/// <reference types="@polkadot/dev/node/test/node.d.ts" />
|
|
|
|
import { u8aToString } from '@polkadot/util';
|
|
|
|
import { base32Decode } from './index.js';
|
|
|
|
describe('base32Decode', (): void => {
|
|
it('decodes a base32', (): void => {
|
|
expect(
|
|
u8aToString(
|
|
base32Decode('irswgzloorzgc3djpjssazlwmvzhs5dinfxgoijb')
|
|
)
|
|
).toEqual('Decentralize everything!!');
|
|
});
|
|
|
|
it('decodes a base32 (ipfsCompat)', (): void => {
|
|
expect(
|
|
u8aToString(
|
|
base32Decode('birswgzloorzgc3djpjssazlwmvzhs5dinfxgoijb', true)
|
|
)
|
|
).toEqual('Decentralize everything!!');
|
|
});
|
|
});
|