test.js 409 B

12345678910111213141516
  1. /*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true eqeqeq:true immed:true latedef:true*/
  2. (function () {
  3. "use strict";
  4. var btoa = require('./index')
  5. , encoded = "SGVsbG8sIBZM"
  6. , unencoded = "Hello, 世界"
  7. ;
  8. if (encoded !== btoa(unencoded)) {
  9. console.error('[FAIL]', encoded, btoa(unencoded));
  10. return;
  11. }
  12. console.log('[PASS] all tests pass');
  13. }());