1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-01 04:27:17 -04:00
notes/node_modules/js-base64/test/yoshinoya.js
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00

23 lines
698 B
JavaScript

/*
* use mocha to test me
* http://visionmedia.github.com/mocha/
*/
var assert, Base64;
if (this['window'] !== this) {
assert = require("assert");
Base64 = require('../base64.js').Base64;
}
var is = function (a, e, m) {
return function () {
assert.equal(a, e, m)
}
};
describe('Yoshinoya', function () {
it('.encode', is(Base64.encode('𠮷野家'), '8KCut+mHjuWutg=='));
it('.encodeURI', is(Base64.encodeURI('𠮷野家'), '8KCut-mHjuWutg'));
it('.decode', is(Base64.decode('8KCut+mHjuWutg=='), '𠮷野家'));
it('.decode', is(Base64.decode('8KCut-mHjuWutg'), '𠮷野家'));
it('.decode', is(Base64.decode('7aGC7b636YeO5a62'), '𠮷野家'));
});