describe('Test API module', function () { this.timeout(20000); it('should decrypt sid', function () { var m = bootstrap(); expect(m.key.length).to.be.equal(4); expect(m.sid.length).to.be.equal(58); expect(m.privk.length).to.be.equal(8); }); it('should decrypt file names', function () { var m = bootstrap(); var files = m.decodeFileNames(getfiles[0].f); expect(files[5].name).to.be.a('string'); expect(files[6].name).to.be.a('string'); expect(files[11].name).to.be.a('string'); }); });
assert.equal(scope.e, 4.5); assert.deepEqual(parseAndEval('a = [1,2,f=3]', scope), math.matrix([1,2,3])); assert.equal(scope.f, 3); assert.equal(parseAndEval('2 + (g = 3 + 4)', scope), 9); assert.equal(scope.g, 7);