atob.js/test.js

19 lines
362 B
JavaScript
Raw Normal View History

2011-09-09 04:18:42 +00:00
(function () {
"use strict";
2018-03-28 04:26:00 +00:00
var atob = require('.');
var encoded = "SGVsbG8sIFdvcmxkIQ=="
var unencoded = "Hello, World!";
2012-09-19 20:22:55 +00:00
/*
, encoded = "SGVsbG8sIBZM"
, unencoded = "Hello, 世界"
*/
2011-09-09 04:18:42 +00:00
2011-09-09 20:56:22 +00:00
if (unencoded !== atob(encoded)) {
2012-09-19 20:22:55 +00:00
console.log('[FAIL]', unencoded, atob(encoded));
2011-09-09 04:18:42 +00:00
return;
}
console.log('[PASS] all tests pass');
}());