forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbase64.ts
More file actions
22 lines (22 loc) · 833 Bytes
/
base64.ts
File metadata and controls
22 lines (22 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace ts {
describe("unittests:: base64", () => {
describe("base64decode", () => {
it("can decode input strings correctly without needing a host implementation", () => {
const tests = [
// "a",
// "this is a test",
// " !\"#$ %&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",
"日本語",
"🐱",
"\x00\x01",
"\t\n\r\\\"\'\u0062",
"====",
"",
];
for (const test of tests) {
assert.equal(base64decode({}, convertToBase64(test)), test);
}
});
});
});
}