Permalink
Browse files

fix for the seed test regarding printing implicit statements with nod…

…e -e
  • Loading branch information...
1 parent f752515 commit 41631f7360e76a1e3da9d623cee228a805f1b7ec @substack committed Sep 2, 2011
Showing with 10 additions and 4 deletions.
  1. +10 −4 test/seed.js
View
@@ -17,11 +17,17 @@ exports.rand = function () {
assert.ok(!err1);
assert.ok(!err2);
- assert.ok(r1.match(/^\d+\n$/));
- assert.ok(r2.match(/^\d+\n$/));
+ assert.ok(
+ r1.match(/^\d+\n/),
+ JSON.stringify(r1) + ' is not an integer'
+ );
+ assert.ok(
+ r2.match(/^\d+\n/),
+ JSON.stringify(r2) + ' is not an integer'
+ );
- var n1 = parseInt(r1, 10);
- var n2 = parseInt(r2, 10);
+ var n1 = parseInt(r1.split('\n')[0], 10);
+ var n2 = parseInt(r2.split('\n')[0], 10);
assert.ok(n1 >= 0, 'n1 >= 0');
assert.ok(n2 >= 0, 'n2 >= 0');

0 comments on commit 41631f7

Please sign in to comment.