Newer
Older
alert / js / node_modules / atob / test.js
@Réz István Réz István on 18 Nov 2021 362 bytes first commit
(function () {
  "use strict";

  var atob = require('.');
  var encoded = "SGVsbG8sIFdvcmxkIQ=="
  var unencoded = "Hello, World!";
  /*
    , encoded = "SGVsbG8sIBZM"
    , unencoded = "Hello, 世界"
  */

  if (unencoded !== atob(encoded)) {
    console.log('[FAIL]', unencoded, atob(encoded));
    return;
  }

  console.log('[PASS] all tests pass');
}());