DEV: Don't leave loadScript tests hanging (#16536)

…when anything goes wrong. Let it move on instead of waiting for global test timeout.
This commit is contained in:
Jarek Radosz 2022-04-22 10:34:13 +02:00 committed by GitHub
parent 3d62e335f7
commit 9ffc19ec60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,11 @@ function loadWithTag(path, cb) {
registerWaiter(() => finished);
}
// Don't leave it hanging if something goes wrong
s.onerror = function () {
finished = true;
};
s.onload = s.onreadystatechange = function (_, abort) {
finished = true;
if (