Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / json-bigint / test / string-option-test.js
1 var mocha  = require('mocha')
2   , assert = require('chai').assert
3   , expect = require('chai').expect
4   ;
5
6 describe("Testing 'storeAsString' option", function(){
7     var key = '{ "key": 12345678901234567 }';
8     it("Should show that the key is of type object", function(done){
9         var JSONbig = require('../index');
10         var result = JSONbig.parse(key);
11         expect(typeof result.key).to.equal("object");
12         done();
13     });
14
15     it("Should show that key is of type string, when storeAsString option is true", function(done){
16         var JSONstring = require('../index')({"storeAsString": true});
17         var result = JSONstring.parse(key);
18         expect(typeof result.key).to.equal("string");
19         done();
20     });
21 });