Permalink
Browse files

additional passing bare test

  • Loading branch information...
1 parent 9434a36 commit e82c9492b8da3d3431e39628f3bb71d698a30e31 @substack committed Sep 28, 2011
Showing with 19 additions and 0 deletions.
  1. +18 −0 test/bare.js
  2. +1 −0 test/sources/bare.js
View
@@ -0,0 +1,18 @@
+var stackedy = require('../');
+var test = require('tap').test;
+
+var fs = require('fs');
+var src = fs.readFileSync(__dirname + '/sources/bare.js', 'utf8');
+
+test('bare throw', function (t) {
+ t.plan(2);
+ var context = { exports : {} };
+ var stack = stackedy(src).run(context);
+
+ stack.on('error', function (err, c) {
+ stack.stop();
+ t.equal(err, 'doom');
+ t.equal(c.current.start.line, 0);
+ t.end();
+ });
+});
View
@@ -0,0 +1 @@
+throw 'doom';

0 comments on commit e82c949

Please sign in to comment.