fixup test since usage of doNetworkOperationWithRetry
doNetworkOperationWithRetry requires to properly mock the get_token endpoint, whereas retryNetworkOperation didn't require it.
This commit is contained in:
@@ -8,6 +8,7 @@ Please see LICENSE in the repository root for full details.
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
afterEach,
|
afterEach,
|
||||||
|
beforeEach,
|
||||||
describe,
|
describe,
|
||||||
expect,
|
expect,
|
||||||
it,
|
it,
|
||||||
@@ -151,6 +152,19 @@ afterEach(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("Start connection states", () => {
|
describe("Start connection states", () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
fetchMock.post(
|
||||||
|
`https://matrix-rtc.example.org/livekit/jwt/get_token`,
|
||||||
|
() => {
|
||||||
|
return {
|
||||||
|
// Return a non-retryable error, if not, the retry logic will
|
||||||
|
// wait and fail the test with a timeout.
|
||||||
|
status: 404,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it("start in initialized state", () => {
|
it("start in initialized state", () => {
|
||||||
setupTest();
|
setupTest();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user