mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Change ND genre ids to b64 encoded strings of genre, so as to differentiate between genre name and id (#54)
This commit is contained in:
17
tests/b64.test.ts
Normal file
17
tests/b64.test.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user