Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80556 views
1
var assert = require('assert')
2
var Base62 = require('../base62')
3
4
describe("encode", function() {
5
it("should encode a number to a Base62 string", function() {
6
assert.equal(Base62.encode(999), 'g7')
7
});
8
});
9
10
describe("decode", function() {
11
it("should decode a number from a Base62 string", function() {
12
assert.equal(Base62.decode('g7'), 999)
13
});
14
});
15