You've already forked matrix-js-sdk
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:
@@ -114,6 +114,10 @@ describe.each([
|
|||||||
});
|
});
|
||||||
|
|
||||||
await httpBackend.flushAllExpected();
|
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() {
|
it("retries on error", async function() {
|
||||||
@@ -141,6 +145,9 @@ describe.each([
|
|||||||
await flushAndRunTimersUntil(() => httpBackend.requests.length > 0);
|
await flushAndRunTimersUntil(() => httpBackend.requests.length > 0);
|
||||||
|
|
||||||
expect(httpBackend.flushSync(null, 1)).toEqual(1);
|
expect(httpBackend.flushSync(null, 1)).toEqual(1);
|
||||||
|
|
||||||
|
// flush, as per comment in first test
|
||||||
|
await flushPromises();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("stops retrying on 4xx errors", async function() {
|
it("stops retrying on 4xx errors", async function() {
|
||||||
@@ -334,5 +341,8 @@ describe.each([
|
|||||||
|
|
||||||
await client.queueToDevice(batch);
|
await client.queueToDevice(batch);
|
||||||
await httpBackend.flushAllExpected();
|
await httpBackend.flushAllExpected();
|
||||||
|
|
||||||
|
// flush, as per comment in first test
|
||||||
|
await flushPromises();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user