mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
17 lines
454 B
TypeScript
17 lines
454 B
TypeScript
import { b64Encode, b64Decode } from "../src/b64";
|
|
|
|
describe("b64", () => {
|
|
const value = "foobar100";
|
|
const encoded = Buffer.from(value).toString("base64");
|
|
|
|
describe("encode", () => {
|
|
it("should encode", () => {
|
|
expect(b64Encode(value)).toEqual(encoded);
|
|
});
|
|
});
|
|
describe("decode", () => {
|
|
it("should decode", () => {
|
|
expect(b64Decode(encoded)).toEqual(value);
|
|
});
|
|
});
|
|
}); |