Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

add fix for webdriverIO bug 2639 #129

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

KGBemployee
Copy link

This is a workaround for webdriverIO bug 2639 regarding details in error stack traces. All the tests pass and no core functionality is affected. Only added effect is that the line at which a test fails is added which helps a lot.
I've added a comment to the issue containing an initial version of the fix and an example of output.
I've also tested this extensively in real usage scenarios and with no ill effects.

@jsf-clabot
Copy link

jsf-clabot commented May 21, 2018

CLA assistant check
All committers have signed the CLA.

@@ -4,6 +4,7 @@ wdio-sync
[![Build Status](https://travis-ci.org/webdriverio/wdio-sync.svg?branch=master)](https://travis-ci.org/webdriverio/wdio-sync) [![Code Climate](https://codeclimate.com/github/webdriverio/wdio-sync/badges/gpa.svg)](https://codeclimate.com/github/webdriverio/wdio-sync) [![Test Coverage](https://codeclimate.com/github/webdriverio/wdio-sync/badges/coverage.svg)](https://codeclimate.com/github/webdriverio/wdio-sync/coverage) [![Dependency Status](https://www.versioneye.com/user/projects/58ba933101b5b7004a7b5b8d/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/58ba933101b5b7004a7b5b8d)

***
*This is a modified version of the wdio-sync with an enhanced stack trace functionality. All of the rights belong to the wdio team.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this line is necessary.

try {
var line = Object.getPrototypeOf(Object.getPrototypeOf(e)).constructor.caller
} catch (e) {
myStackTrace = e.stack.split('\n').slice(2, e.stack.split('\n').length).join('\n');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would e.stack and myStackTrace look like here?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants