File tree 2 files changed +9
-1
lines changed 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
3
const extractPathRegex = / \s + a t .* (?: \( | \s ) ( .* ) \) ? / ;
4
- const pathRegex = / ^ (?: (?: (?: n o d e | (?: i n t e r n a l \/ | .* n o d e _ m o d u l e s \/ b a b e l - p o l y f i l l \/ .* ) ? \w + ) \. j s : \d + : \d + ) | n a t i v e ) / ;
4
+ const pathRegex = / ^ (?: (?: (?: n o d e | (?: i n t e r n a l \/ [ \w / ] * | .* n o d e _ m o d u l e s \/ b a b e l - p o l y f i l l \/ .* ) ? \w + ) \. j s : \d + : \d + ) | n a t i v e ) / ;
5
5
6
6
module . exports = stack => {
7
7
return stack . replace ( / \\ / g, '/' )
Original file line number Diff line number Diff line change @@ -44,6 +44,14 @@ test('internal child_process', t => {
44
44
t . is ( m ( stack ) , pre ) ;
45
45
} ) ;
46
46
47
+ test ( 'internal next_tick' , t => {
48
+ const pre = 'Error: foo\n at Object.<anonymous> (/Users/sindresorhus/dev/clean-stack/unicorn.js:4:7)' ;
49
+ const stack = `${ pre } \n
50
+ at _combinedTickCallback (internal/process/next_tick.js:67:7)
51
+ at process._tickCallback (internal/process/next_tick.js:98:9)` ;
52
+ t . is ( m ( stack ) , pre ) ;
53
+ } ) ;
54
+
47
55
test ( 'babel-polyfill' , t => {
48
56
const pre = 'Error: foo\n at Object.<anonymous> (/Users/sindresorhus/dev/clean-stack/unicorn.js:4:7)' ;
49
57
const stack = `${ pre } \n
You can’t perform that action at this time.
0 commit comments