Update tests not to mock out an ancient server (#26796)

The loading test, which mocks a `/versions` response, currently mocks the
response of a 2-year-old server. This will soon be incompatible with the
JS-SDK. Update the test in preparation.
This commit is contained in:
Richard van der Hoff 2024-01-02 11:14:57 +00:00 committed by GitHub
parent 2555ffc0d4
commit 258fc405db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 5 deletions

View file

@ -21,6 +21,9 @@ import fetchMock from "fetch-mock-jest";
import { loadApp } from "../../src/vector/app";
import WebPlatform from "../../src/vector/platform/WebPlatform";
/** The matrix versions our mock server claims to support */
const SERVER_SUPPORTED_MATRIX_VERSIONS = ["v1.1", "v1.5", "v1.6", "v1.8", "v1.9"];
fetchMock.config.overwriteRoutes = true;
describe("Loading server config", function () {
@ -29,7 +32,7 @@ describe("Loading server config", function () {
PlatformPeg.set(new WebPlatform());
fetchMock.get("https://matrix-client.matrix.org/_matrix/client/versions", {
unstable_features: {},
versions: ["v1.1"],
versions: SERVER_SUPPORTED_MATRIX_VERSIONS,
});
fetchMock.get("https://matrix.org/.well-known/matrix/client", {
"m.homeserver": {