Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed eternal loop with error emitter
- Loading branch information
Andris Reinman
committed
Jul 29, 2012
1 parent
860a504
commit 77adfa0
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var nodeunit = require('nodeunit'); | ||
var path = require('path'); | ||
var xml2object = require('../lib/xml2object'); | ||
|
||
exports.testError = function(test){ | ||
test.expect(1); | ||
|
||
var parser = new xml2object(['dog'], path.normalize(__dirname + '/fixture/input02.xml')); | ||
var found = []; | ||
|
||
parser.on('error', function(error) { | ||
test.ok(error instanceof Error); | ||
test.done(); | ||
}); | ||
|
||
parser.start(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
just some invalid xml data |