mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +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) {
|
||||
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) {
|
||||
|
Reference in New Issue
Block a user