1namespace ts { 2 describe("unittests:: base64", () => { 3 describe("base64decode", () => { 4 it("can decode input strings correctly without needing a host implementation", () => { 5 const tests = [ 6 // "a", 7 // "this is a test", 8 // " !\"#$ %&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", 9 "日本語", 10 "", 11 "\x00\x01", 12 "\t\n\r\\\"\'\u0062", 13 "====", 14 "", 15 ]; 16 for (const test of tests) { 17 assert.equal(base64decode({}, convertToBase64(test)), test); 18 } 19 }); 20 }); 21 }); 22} 23