8000 Provide more context when test fails due to timeout in `waitsFor` by jasonrudolph · Pull Request #17351 · atom/atom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Provide more context when test fails due to timeout in waitsFor #17351

Merged
merged 1 commit into from
May 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions vendor/jasmine.js
Original file line number Diff line number Diff line change
Expand Up @@ -2317,6 +2317,14 @@ jasmine.Spec.prototype.waitsFor = function(latchFunction, optional_timeoutMessag
}
}

if (optional_timeoutMessage_ == null) {
const objectToCaptureStack = {}
Error.captureStackTrace(objectToCaptureStack, waitsFor)
const stack = objectToCaptureStack.stack
const line = stack.split('\n')[1]
optional_timeoutMessage_ = `condition ${line}`
}

var waitsForFunc = new jasmine.WaitsForBlock(this.env, optional_timeout_, latchFunction_, optional_timeoutMessage_, this);
this.addToQueue(waitsForFunc);
return this;
Expand Down
0