atob.js/test.js

19 lines
362 B
JavaScript
Raw Normal View History

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