stacktracey
Advanced tools
Comparing version 1.2.91 to 1.2.92
{ | ||
"name": "stacktracey", | ||
"version": "1.2.91", | ||
"version": "1.2.92", | ||
"description": "Parses call stacks. Reads sources. Clean & filtered output. Sourcemaps. Node & browsers.", | ||
@@ -5,0 +5,0 @@ "main": "stacktracey", |
28
test.js
@@ -23,3 +23,6 @@ "use strict"; | ||
const StackTracey = require ('./stacktracey'); StackTracey.resetCache () | ||
const path = require ('path') | ||
const StackTracey = require ('./stacktracey') | ||
StackTracey.resetCache () | ||
@@ -35,8 +38,8 @@ const shouldBeVisibleInStackTrace = () => new StackTracey () // @hide | ||
stack[0].should.deep.equal ({ | ||
beforeParse: 'at shouldBeVisibleInStackTrace (' + process.cwd () + '/test.js:25:47)', | ||
beforeParse: 'at shouldBeVisibleInStackTrace (' + path.join (process.cwd (), 'test.js') + ':28:47)', | ||
callee: 'shouldBeVisibleInStackTrace', | ||
index: false, | ||
native: false, | ||
file: process.cwd () + '/test.js', | ||
line: 25, | ||
file: path.join (process.cwd (), 'test.js'), | ||
line: 28, | ||
column: 47, | ||
@@ -116,4 +119,3 @@ calleeShort: 'shouldBeVisibleInStackTrace', | ||
const path = require ('path'), | ||
mkay = require ('./test_files/mkay.uglified') | ||
const mkay = require ('./test_files/mkay.uglified') | ||
@@ -133,3 +135,3 @@ try { | ||
top.file .should.equal (path.resolve ('./test_files/mkay.js')) | ||
top.file .should.equal (path.resolve ('./test_files/mkay.js').replace (/\\/g, '/')) | ||
top.fileShort .should.equal ('test_files/mkay.js') | ||
@@ -144,3 +146,3 @@ top.fileName .should.equal ('mkay.js') | ||
pretty.split ('\n')[0].should.equal ('at prettyTest test.js:138 const pretty = new StackTracey ().clean.pretty') | ||
pretty.split ('\n')[0].should.equal ('at prettyTest test.js:140 const pretty = new StackTracey ().clean.pretty') | ||
@@ -255,3 +257,3 @@ ;(new StackTracey ([ | ||
'Error', | ||
' at Context.it (' + dir + '\\test.js:31:22)', | ||
' at Context.it (' + dir + '\\test.js:34:22)', | ||
' at callFn (' + dir + '\\node_modules\\mocha\\lib\\runnable.js:354:21)', | ||
@@ -262,5 +264,9 @@ ' at runCallback (timers.js:800:20)' | ||
const stack = new StackTracey (windowsStack) | ||
const lines = stack.pretty.split ('\n') | ||
const pretty = stack.pretty | ||
const lines = pretty.split ('\n') | ||
lines[0].should.equal ('at it test.js:31 stack.should.be.an.instanceof (Array)') | ||
console.log ('') | ||
console.log (pretty, '\n') | ||
lines[0].should.equal ('at it test.js:34 stack.should.be.an.instanceof (Array)') | ||
lines[1].indexOf ('at callFn mocha/lib/runnable.js:354').should.equal (0) | ||
@@ -267,0 +273,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
207845
5913