aswi2020vldc-gitlab/templetes/node_modules/atob/test.js @ 143404cb
1 | 3a515b92 | cagy | (function () { |
---|---|---|---|
2 | "use strict"; |
||
3 | |||
4 | var atob = require('.'); |
||
5 | var encoded = "SGVsbG8sIFdvcmxkIQ==" |
||
6 | var unencoded = "Hello, World!"; |
||
7 | /*
|
||
8 | , encoded = "SGVsbG8sIBZM"
|
||
9 | , unencoded = "Hello, 世界"
|
||
10 | */
|
||
11 | |||
12 | if (unencoded !== atob(encoded)) { |
||
13 | console.log('[FAIL]', unencoded, atob(encoded)); |
||
14 | return; |
||
15 | }
|
||
16 | |||
17 | console.log('[PASS] all tests pass'); |
||
18 | }());
|