22 lines
635 B
TypeScript
22 lines
635 B
TypeScript
|
import { decodeBuffer, encodeBuffer } from '@/lib/buffer';
|
||
|
|
||
|
describe('@/lib/buffer.ts', function () {
|
||
|
describe('decodeBuffer()', function () {
|
||
|
it.each([
|
||
|
['', ''],
|
||
|
['', ''],
|
||
|
])('should decode "%s" to "%s"', function (input, output) {
|
||
|
expect(decodeBuffer(input)).toBe(output);
|
||
|
});
|
||
|
});
|
||
|
|
||
|
describe('encodeBuffer()', function () {
|
||
|
it.each([
|
||
|
[new Uint8Array(0), ''],
|
||
|
[new Uint8Array(0), ''],
|
||
|
])('should encode "%s" to "%s"', function (input, output) {
|
||
|
expect(encodeBuffer(input)).toBe(output);
|
||
|
});
|
||
|
});
|
||
|
});
|