1
0

run npm install to generate a package lock

This commit is contained in:
sashinexists
2024-12-07 13:18:31 +11:00
parent e7d08a91b5
commit 23437d228e
2501 changed files with 290663 additions and 0 deletions

43
node_modules/node-buffer-encoding/test/index.js generated vendored Normal file
View File

@@ -0,0 +1,43 @@
/* IMPORT */
import {describe} from 'fava';
import BufferEncoding from '../dist/index.js';
/* MAIN */
describe ( 'BufferEncoding', it => {
it ( 'encodes an Uint8Array with the given encoding', t => {
const result = BufferEncoding.encode ( new Uint8Array ([ 0, 255 ]), 'hex' );
t.is ( result, '00ff' );
});
it ( 'encodes a string with the given encoding', t => {
const result = BufferEncoding.encodeStr ( 'hello', 'base64' );
t.is ( result, 'aGVsbG8=' );
});
it ( 'decodes a string with the given encoding to an Uint8Array', t => {
const result = BufferEncoding.decode ( '00ff', 'hex' );;
t.deepEqual ( result, new Uint8Array ([ 0, 255 ]) );
});
it ( 'decodes a string with the given encoding to a string', t => {
const result = BufferEncoding.decodeStr ( 'aGVsbG8=', 'base64' );
t.is ( result, 'hello' );
});
});