Skip to content

Commit aaaf6f7

Browse files
committed
Document TAP_DEV_LONGSTACK/SHORTSTACK environs
Also, no need to exclude both the lib dir and the tap dir, since they're the same thing.
1 parent fbf56f5 commit aaaf6f7

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

bin/usage.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,18 @@ Environment Variables:
195195
TAP_BUFFER Set to '1' to run subtests in buffered
196196
mode by default.
197197

198+
TAP_DEV_LONGSTACK Set to '1' to include node-tap internals
199+
in stack traces. By default, these are
200+
included only when the current working
201+
directory is the tap project itself.
202+
Note that node internals are always
203+
excluded.
204+
205+
TAP_DEV_SHORTSTACK Set to '1' to exclude node-tap internals
206+
in stack traces, even if the current
207+
working directory is the tap project
208+
itself.
209+
198210
_TAP_COVERAGE_ Reserved for internal use.
199211

200212
Config Files:

lib/stack.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ var skip = process.cwd() !== tapDir ||
88
+process.env.TAP_DEV_LONGSTACK !== 1
99
? [
1010
/node_modules[\/\\]tap[\/\\]/,
11-
new RegExp(resc(tapDir)),
11+
new RegExp(resc(tapDir) + '\\b', 'i'),
1212
new RegExp(resc(require.resolve('function-loop'))),
13-
new RegExp(resc(path.dirname(require.resolve('bluebird/package.json')))),
14-
new RegExp(resc(__dirname) + '\\b', 'i')
13+
new RegExp(resc(path.dirname(require.resolve('bluebird/package.json'))))
1514
]
1615
: []
1716

0 commit comments

Comments
 (0)