Skip to content
Browse files

failing test for syntax errors

  • Loading branch information...
1 parent bb42767 commit b7a9a68eccd60c20db8ec1ff67cdd35602fe3e52 @substack committed May 17, 2012
Showing with 22 additions and 0 deletions.
  1. +20 −0 test/error_code.js
  2. +2 −0 test/error_code/src.js
View
20 test/error_code.js
@@ -0,0 +1,20 @@
+var test = require('tap').test;
+var spawn = require('child_process').spawn;
+
+if (false) require('__32jlkbeep');
+
+test('error code', function (t) {
+ t.plan(1);
+
+ var cwd = process.cwd();
+ process.chdir(__dirname);
+
+ var ps = spawn(__dirname + '/../bin/cli.js', [
+ __dirname + '/error_code/src.js'
+ ]);
+ ps.stderr.pipe(process.stdout, { end : false });
+
+ ps.on('exit', function (code) {
+ t.notEqual(code, 0);
+ });
+});
View
2 test/error_code/src.js
@@ -0,0 +1,2 @@
+var x = {
+var y = 6;

0 comments on commit b7a9a68

Please sign in to comment.
Something went wrong with that request. Please try again.