Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures now report the real failure location #29

Merged
merged 2 commits into from
Sep 29, 2015
Merged

Conversation

appden
Copy link
Contributor

@appden appden commented Sep 28, 2015

In the case of test failures, a TestFailureError object is thrown, which removes the last two stack frames so the true source of the failure is revealed to the native code.

Clicking on a failure in the Xcode sidebar will take you to exactly where it occurred now.

Fixes #28

In the case of test failures, a TestFailureError object is thrown, which removes the last two stack frames so the true source of the failure is revealed to the native code.

Clicking on a failure in the Xcode sidebar will take you to exactly where it occurred now.

Fixes #28

// Remove the top two stack frames if possible.
var stack = error.stack && error.stack.split('\n');
var match = stack[2] && stack[2].match(/^(?:.*?@)?([^\[\(].+?):(\d+)(?::(\d+))?/);
Copy link
Contributor

Choose a reason for hiding this comment

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

Some comments here on what you are matching would be helpful - maybe put an example message in the comments.

@alazier
Copy link
Contributor

alazier commented Sep 29, 2015

Once you add a comment for the regex 👍

appden added a commit that referenced this pull request Sep 29, 2015
Test failures now report the real failure location
@appden appden merged commit 8e11008 into master Sep 29, 2015
@appden appden deleted the test-failures branch September 29, 2015 01:13
alazier added a commit that referenced this pull request Jan 19, 2016
Outstanding ObjectStore changes from the JS branch
alazier pushed a commit that referenced this pull request Sep 14, 2016
Update sync client API usage for session-specific auth
@pawellewandowski pawellewandowski mentioned this pull request Apr 14, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
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.

2 participants