You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718
  1. (function () {
  2. "use strict";
  3. var atob = require('.');
  4. var encoded = "SGVsbG8sIFdvcmxkIQ=="
  5. var unencoded = "Hello, World!";
  6. /*
  7. , encoded = "SGVsbG8sIBZM"
  8. , unencoded = "Hello, 世界"
  9. */
  10. if (unencoded !== atob(encoded)) {
  11. console.log('[FAIL]', unencoded, atob(encoded));
  12. return;
  13. }
  14. console.log('[PASS] all tests pass');
  15. }());