Skip to content

Commit

Permalink
Document TAP_DEV_LONGSTACK/SHORTSTACK environs
Browse files Browse the repository at this point in the history
Also, no need to exclude both the lib dir and the tap dir, since they're
the same thing.
  • Loading branch information
isaacs committed Feb 2, 2017
1 parent fbf56f5 commit aaaf6f7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
12 changes: 12 additions & 0 deletions bin/usage.txt
Expand Up @@ -195,6 +195,18 @@ Environment Variables:
TAP_BUFFER Set to '1' to run subtests in buffered
mode by default.

TAP_DEV_LONGSTACK Set to '1' to include node-tap internals
in stack traces. By default, these are
included only when the current working
directory is the tap project itself.
Note that node internals are always
excluded.

TAP_DEV_SHORTSTACK Set to '1' to exclude node-tap internals
in stack traces, even if the current
working directory is the tap project
itself.

_TAP_COVERAGE_ Reserved for internal use.

Config Files:
Expand Down
5 changes: 2 additions & 3 deletions lib/stack.js
Expand Up @@ -8,10 +8,9 @@ var skip = process.cwd() !== tapDir ||
+process.env.TAP_DEV_LONGSTACK !== 1
? [
/node_modules[\/\\]tap[\/\\]/,
new RegExp(resc(tapDir)),
new RegExp(resc(tapDir) + '\\b', 'i'),
new RegExp(resc(require.resolve('function-loop'))),
new RegExp(resc(path.dirname(require.resolve('bluebird/package.json')))),
new RegExp(resc(__dirname) + '\\b', 'i')
new RegExp(resc(path.dirname(require.resolve('bluebird/package.json'))))
]
: []

Expand Down

0 comments on commit aaaf6f7

Please sign in to comment.