Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

additional passing bare test

  • Loading branch information...
commit e82c9492b8da3d3431e39628f3bb71d698a30e31 1 parent 9434a36
James Halliday authored
Showing with 19 additions and 0 deletions.
  1. +18 −0 test/bare.js
  2. +1 −0  test/sources/bare.js
18 test/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();
+ });
+});
1  test/sources/bare.js
View
@@ -0,0 +1 @@
+throw 'doom';
Please sign in to comment.
Something went wrong with that request. Please try again.