console.log('[xml2json: ' + file + '->' + jsonFile + '] passed!');
} else if( ext == '.json') {
var basename = path.basename(file, '.json');
if (basename.match('reversible')) {
var data = fs.readFileSync(fixturesPath + '/' + file);
var result = parser.toXml(data);
var xmlFile = basename.split('-')[0] + '.xml';
var expected = fs.readFileSync(fixturesPath + '/' + xmlFile) + '';
if (expected) {
expected = expected.trim();
}
//console.log(result + '<---');
assert.deepEqual(result, expected, xmlFile + ' and ' + file + ' are different');
console.log('[json2xml: ' + file + '->' + xmlFile + '] passed!');
}