Improve browser tests

- Listen for image change event instead of waiting 200 ms
- Properly fake fetch response, can never be undefined on resolve
This commit is contained in:
Maximilian Krög
2022-05-15 09:07:15 +02:00
parent 302a9d51e1
commit ecf90a49c8
2 changed files with 10 additions and 7 deletions

View File

@@ -208,7 +208,7 @@ describe('ol/layer/MapboxVector', () => {
originalFetch = fetch;
window.fetch = function (url) {
fetchUrl = url;
return Promise.resolve();
return Promise.resolve({ok: false});
};
});
afterEach(function () {