Skip to content

Commit 832f942

Browse files
Export stackUtils
1 parent f5b970c commit 832f942

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

lib/reporters/beautify-stack.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const stackUtils = new StackUtils({
2323
]
2424
});
2525

26+
exports.stackUtils = stackUtils;
27+
2628
/*
2729
* Given a string value of the format generated for the `stack` property of a
2830
* V8 error object, return a string that contains only stack frame information
@@ -59,7 +61,7 @@ const stackUtils = new StackUtils({
5961
* Module.runMain (module.js:604:10)
6062
* ```
6163
*/
62-
module.exports = stack => {
64+
exports.beautifyStack = stack => {
6365
if (!stack) {
6466
return [];
6567
}

lib/reporters/default.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const trimOffNewlines = require('trim-off-newlines');
1313

1414
const chalk = require('../chalk').get();
1515
const codeExcerpt = require('../code-excerpt');
16-
const beautifyStack = require('./beautify-stack');
16+
const {beautifyStack} = require('./beautify-stack');
1717
const colors = require('./colors');
1818
const formatSerializedError = require('./format-serialized-error');
1919
const improperUsageMessages = require('./improper-usage-messages');

lib/reporters/tap.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const stripAnsi = require('strip-ansi');
77
const supertap = require('supertap');
88
const indentString = require('indent-string');
99

10-
const beautifyStack = require('./beautify-stack');
10+
const {beautifyStack} = require('./beautify-stack');
1111
const prefixTitle = require('./prefix-title');
1212

1313
function dumpError(error) {

0 commit comments

Comments
 (0)