yoshinoya.js 698 B

12345678910111213141516171819202122
  1. /*
  2. * use mocha to test me
  3. * http://visionmedia.github.com/mocha/
  4. */
  5. var assert, Base64;
  6. if (this['window'] !== this) {
  7. assert = require("assert");
  8. Base64 = require('../base64.js').Base64;
  9. }
  10. var is = function (a, e, m) {
  11. return function () {
  12. assert.equal(a, e, m)
  13. }
  14. };
  15. describe('Yoshinoya', function () {
  16. it('.encode', is(Base64.encode('𠮷野家'), '8KCut+mHjuWutg=='));
  17. it('.encodeURI', is(Base64.encodeURI('𠮷野家'), '8KCut-mHjuWutg'));
  18. it('.decode', is(Base64.decode('8KCut+mHjuWutg=='), '𠮷野家'));
  19. it('.decode', is(Base64.decode('8KCut-mHjuWutg'), '𠮷野家'));
  20. it('.decode', is(Base64.decode('7aGC7b636YeO5a62'), '𠮷野家'));
  21. });