1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-09 10:22:46 +03:00

Fix output after test finished (#2564)

* Fix output after test finished

As per comment

* Add more flushes
This commit is contained in:
David Baker
2022-08-04 17:28:42 +01:00
committed by GitHub
parent c629d2f60e
commit 3907d1c28f

View File

@@ -114,6 +114,10 @@ describe.each([
});
await httpBackend.flushAllExpected();
// let the code handle the response to the request so we don't get
// log output after the test has finished (apparently stopping the
// client in aftereach is not sufficient.)
await flushPromises();
});
it("retries on error", async function() {
@@ -141,6 +145,9 @@ describe.each([
await flushAndRunTimersUntil(() => httpBackend.requests.length > 0);
expect(httpBackend.flushSync(null, 1)).toEqual(1);
// flush, as per comment in first test
await flushPromises();
});
it("stops retrying on 4xx errors", async function() {
@@ -334,5 +341,8 @@ describe.each([
await client.queueToDevice(batch);
await httpBackend.flushAllExpected();
// flush, as per comment in first test
await flushPromises();
});
});