Files
common/packages/x-textencoder/src/fallback.spec.ts
T
2022-01-01 09:26:11 +02:00

13 lines
347 B
TypeScript

// Copyright 2017-2022 @polkadot/x-textencoder authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { TextEncoder } from './fallback';
describe('TextEncoder (fallback)', (): void => {
it('encodes correctly', (): void => {
expect(
new TextEncoder().encode('abc')
).toEqual(new Uint8Array([97, 98, 99]));
});
});