source: imaps-frontend/node_modules/fastest-stable-stringify/test/bench.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 519 bytes
RevLine 
[d565449]1'use strict';
2
3var test = require('tape');
4var stringify = require('../');
5var tests = require('../benchmark/test.json');
6var expect = require('chai').expect;
7
8for (var i = 0; i < tests.length; i++) {
9 var json = tests[i];
10
11 test('Benchmark - ' + i, function (t) {
12 var str = stringify(json);
13 var str2 = JSON.stringify(json);
14 var back = JSON.parse(str);
15 var back2 = JSON.parse(str2);
16 expect(back).to.eql(json);
17 expect(back2).to.eql(json);
18 t.end();
19 });
20}
Note: See TracBrowser for help on using the repository browser.