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

Commit 5cdcce2

Browse files
committed
convert array notation test to lab. remove unnecesary makefile
1 parent 9f7e2ed commit 5cdcce2

File tree

4 files changed

+12
-20
lines changed

4 files changed

+12
-20
lines changed

Makefile

Lines changed: 0 additions & 7 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"license": "MIT",
77
"main": "index",
88
"scripts": {
9-
"test": "make test"
9+
"test": "lab -a code -v test/test.js"
1010
},
1111
"dependencies": {
1212
"hoek": "^2.14.0",

test/test-array-notation.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

test/test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,17 @@ describe('json2xml', function () {
166166
done();
167167
});
168168

169+
it('works with array notation', function (done) {
170+
171+
var xml = fs.readFileSync('./test/fixtures/array-notation.xml');
172+
var expectedJson = JSON.parse( fs.readFileSync('./test/fixtures/array-notation.json') );
173+
174+
var json = parser.toJson(xml, {object: true, arrayNotation: true});
175+
176+
expect(json).to.deep.equal(expectedJson);
177+
178+
done();
179+
});
169180
});
170181

171182

0 commit comments

Comments
 (0)