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
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var test = require('tape');
|
---|
4 | var stringify = require('../');
|
---|
5 | var tests = require('../benchmark/test.json');
|
---|
6 | var expect = require('chai').expect;
|
---|
7 |
|
---|
8 | for (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.