You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-07-14 01:21:48 +03:00
* add test run helper to allow running long tests in vs code * deprecate IDeferred (as its associated defer method is also deprecated and its just a type rename to PromiseWithResolvers) * Improve docs and readability of MembershipManager.spec.ts * Intoduce test for a race condition which results in a state where the state event and the hasMemberStateEvent variable diverge * fix room state and membership manager state diverging. See: https://github.com/element-hq/element-call-rageshakes/issues/10609 https://github.com/element-hq/element-call-rageshakes/issues/10594 https://github.com/element-hq/element-call-rageshakes/issues/9902 * logging, docstings and variable name improvements * review * review pending timers
27 lines
976 B
TypeScript
27 lines
976 B
TypeScript
/*
|
|
Copyright 2022 The Matrix.org Foundation C.I.C.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
jest.mock("../src/http-api/utils", () => ({
|
|
...jest.requireActual("../src/http-api/utils"),
|
|
// We mock timeoutSignal otherwise it causes tests to leave timers running
|
|
timeoutSignal: () => new AbortController().signal,
|
|
}));
|
|
|
|
// Dont make test fail too soon due to timeouts while debugging.
|
|
if (process.env.VSCODE_INSPECTOR_OPTIONS) {
|
|
jest.setTimeout(60 * 1000 * 5); // 5 minutes
|
|
}
|