Skip to content

Commit

Permalink
Fix stack trace chopping #350
Browse files Browse the repository at this point in the history
* Fix stack trace chopping #350

Signed-off-by: BugDiver <[email protected]>

* Bump up versions

Signed-off-by: BugDiver <[email protected]>
  • Loading branch information
Vinay Shankar Shukla authored Jul 7, 2020
1 parent e94fcd0 commit c656e41
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"--init"
]
},
"version": "2.3.11",
"version": "2.3.12",
"gaugeVersionSupport": {
"minimum": "1.0.7",
"maximum": ""
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gauge-js",
"version": "2.3.11",
"version": "2.3.12",
"description": "JavaScript runner for Gauge",
"main": "index.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ var chopStackTrace = function (stack, pattern) {
var limit = stack.findIndex(function (frame) {
return frame.match(pattern);
});
return absoluteToRelativePath(stack.slice(0, limit)).join("\n");
stack = limit > 0 ? stack.slice(0, limit) : stack;
return absoluteToRelativePath(stack).join("\n");
};

var runFn = function () {
Expand Down

0 comments on commit c656e41

Please sign in to comment.