Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit 1f29dcd

Browse files
committed
add json2xml test cases
1 parent 1df7d4d commit 1f29dcd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/test-space.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ var assert = require('assert');
55

66
var xml = fs.readFileSync(__dirname + '/fixtures/spacetext.xml');
77
var json = parser.toJson(xml, {object: true, space: true});
8-
console.log('%j', json);
8+
console.log('xml => json: \n%j', json);
99

10+
console.log('---------------------\njson => xml: \n%j\n',
11+
parser.toXml(fs.readFileSync(__dirname + '/fixtures/spacetext.json')));
1012
function eql(a, b) {
1113
for (var k in a) {
1214
assert.deepEqual(a[k], b[k], JSON.stringify(a) + ' should equal ' + JSON.stringify(b));

0 commit comments

Comments
 (0)