Permalink
Browse files

make the protofn test more lenient about the errors

  • Loading branch information...
substack committed Jun 15, 2012
1 parent f748b72 commit bdae4e00fc1737b362125a7000438d5948ac10e1
Showing with 2 additions and 3 deletions.
  1. +2 −3 test/fn.js
View
@@ -7,7 +7,7 @@ var traverse = require('traverse');
var EventEmitter = require('events').EventEmitter;
test('protoFn', function (t) {
- t.plan(11);
+ t.plan(10);
var server = proto(function (remote, conn) {
t.ok(conn);
@@ -79,8 +79,7 @@ test('protoFn', function (t) {
} ]);
c.on('error', function (err) {
- t.ok(err.stack);
- t.ok(err.message.match(/^Error parsing JSON/));
+ t.ok(/JSON/.test(String(err)));
t.ok(err instanceof SyntaxError);
});
c.parse('{');

0 comments on commit bdae4e0

Please sign in to comment.