mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-08 12:38:39 +00:00
Ensure screenshotter runs *all* tests. (#769)
Previously, we added a `oneDone` promise *every time a test attempt failed*. This decremented the count of remaining tests once per failed attempt. As a result, Chrome tests didn't run to the end.
This commit is contained in:
committed by
Kevin Barabash
parent
8c53698b35
commit
32c7fc47d1
@@ -406,7 +406,12 @@ function takeScreenshot(key) {
|
|||||||
if (opts.wait) {
|
if (opts.wait) {
|
||||||
browserSideWait(1000 * opts.wait);
|
browserSideWait(1000 * opts.wait);
|
||||||
}
|
}
|
||||||
driver.takeScreenshot().then(haveScreenshot).then(oneDone, check);
|
const promise = driver.takeScreenshot().then(haveScreenshot);
|
||||||
|
if (retry === 0) {
|
||||||
|
// The `oneDone` promise remains outstanding if we retry, so
|
||||||
|
// don't re-add it
|
||||||
|
promise.then(oneDone, check);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function haveScreenshot(img) {
|
function haveScreenshot(img) {
|
||||||
|
Reference in New Issue
Block a user