Skip to content

Commit

Permalink
Properly filter out tap dir from stack traces
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Feb 2, 2017
1 parent c14ae9f commit 114635c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/stack.js
@@ -1,12 +1,14 @@
var StackUtils = require('stack-utils')
var path = require('path')
var tapDir = path.resolve(__dirname, '..')

// don't skip when developing on tap itself
var skip = __dirname.indexOf(process.cwd()) !== 0 ||
var skip = process.cwd() !== tapDir ||
+process.env.TAP_DEV_SHORTSTACK === 1 &&
+process.env.TAP_DEV_LONGSTACK !== 1
? [
/node_modules[\/\\]tap[\/\\]/,
new RegExp(resc(tapDir)),
new RegExp(resc(require.resolve('function-loop'))),
new RegExp(resc(path.dirname(require.resolve('bluebird/package.json')))),
new RegExp(resc(__dirname) + '\\b', 'i')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -32,7 +32,7 @@
"own-or-env": "^1.0.0",
"readable-stream": "^2.0.2",
"signal-exit": "^3.0.0",
"stack-utils": "^0.4.0",
"stack-utils": "^1.0.0",
"tap-mocha-reporter": "^3.0.1",
"tap-parser": "^5.3.1",
"tmatch": "^3.0.0",
Expand Down

0 comments on commit 114635c

Please sign in to comment.