js-base64 2.3.2 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,25 @@
1
+ /*
2
+ * $Id: large.js,v 0.3 2012/08/23 19:14:37 dankogai Exp dankogai $
3
+ *
4
+ * use mocha to test me
5
+ * http://visionmedia.github.com/mocha/
6
+ */
7
+ var assert = assert || require("assert");
8
+ var Base64 = Base64 || require('../base64.js').Base64;
9
+ var is = function (a, e, m) {
10
+ return function () {
11
+ assert.equal(a, e, m)
12
+ }
13
+ };
14
+ var seed = function () {
15
+ var a, i;
16
+ for (a = [], i = 0; i < 256; i++) {
17
+ a.push(String.fromCharCode(i));
18
+ }
19
+ return a.join('');
20
+ }();
21
+ describe('Base64', function () {
22
+ for (var i = 0, str = seed; i < 16; str += str, i++) {
23
+ it(''+str.length, is(Base64.decode(Base64.encode(str)), str));
24
+ }
25
+ });