Correct incorect hard-coded string in test mock (#34022)
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
|||||||
TypedEventEmitter,
|
TypedEventEmitter,
|
||||||
MatrixHttpApi,
|
MatrixHttpApi,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
|
import { CrossSigningKey } from "matrix-js-sdk/src/crypto-api";
|
||||||
import fetchMock from "@fetch-mock/jest";
|
import fetchMock from "@fetch-mock/jest";
|
||||||
|
|
||||||
import { getMockClientWithEventEmitter, mockClientMethodsCrypto, mockPlatformPeg } from "../test-utils";
|
import { getMockClientWithEventEmitter, mockClientMethodsCrypto, mockPlatformPeg } from "../test-utils";
|
||||||
@@ -193,7 +194,7 @@ describe("Rageshakes", () => {
|
|||||||
const crossSigningPubKey = "crossSigningPubKey";
|
const crossSigningPubKey = "crossSigningPubKey";
|
||||||
mocked(mockClient.getCrypto()!.getCrossSigningKeyId).mockImplementation(
|
mocked(mockClient.getCrypto()!.getCrossSigningKeyId).mockImplementation(
|
||||||
async (type): Promise<string | null> => {
|
async (type): Promise<string | null> => {
|
||||||
if (!type || type === "master") {
|
if (!type || type === CrossSigningKey.Master) {
|
||||||
return crossSigningPubKey;
|
return crossSigningPubKey;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user