You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-09-01 19:42:03 +03:00
Clean up some unit test logs (#7857)
* kill some unit test logs in arrays-test Signed-off-by: Kerry Archibald <kerrya@element.io> * remove mock logs that are asserted against anyway * remove more logs Signed-off-by: Kerry Archibald <kerrya@element.io> * fix safeCOunterpartTranslate warnings in tests Signed-off-by: Kerry Archibald <kerrya@element.io> * more safeCounterpartTranslate warnings Signed-off-by: Kerry Archibald <kerrya@element.io> * lint Signed-off-by: Kerry Archibald <kerrya@element.io> * remove more logs Signed-off-by: Kerry Archibald <kerrya@element.io> * add helper Signed-off-by: Kerry Archibald <kerrya@element.io> * naming Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
@@ -20,7 +20,7 @@ import ReactTestUtils from 'react-dom/test-utils';
|
||||
import { createClient } from 'matrix-js-sdk/src/matrix';
|
||||
|
||||
import sdk from '../../../skinned-sdk';
|
||||
import SdkConfig from '../../../../src/SdkConfig';
|
||||
import SdkConfig, { DEFAULTS } from '../../../../src/SdkConfig';
|
||||
import { createTestClient, mkServerConfig } from "../../../test-utils";
|
||||
|
||||
jest.mock('matrix-js-sdk/src/matrix');
|
||||
@@ -34,6 +34,10 @@ describe('Registration', function() {
|
||||
let parentDiv;
|
||||
|
||||
beforeEach(function() {
|
||||
jest.spyOn(SdkConfig, "get").mockReturnValue({
|
||||
...DEFAULTS,
|
||||
disable_custom_urls: true,
|
||||
});
|
||||
parentDiv = document.createElement('div');
|
||||
document.body.appendChild(parentDiv);
|
||||
createClient.mockImplementation(() => createTestClient());
|
||||
@@ -61,10 +65,6 @@ describe('Registration', function() {
|
||||
});
|
||||
|
||||
it('should show form when custom URLs disabled', async function() {
|
||||
jest.spyOn(SdkConfig, "get").mockReturnValue({
|
||||
disable_custom_urls: true,
|
||||
});
|
||||
|
||||
const root = render();
|
||||
|
||||
// Set non-empty flows & matrixClient to get past the loading spinner
|
||||
@@ -84,10 +84,6 @@ describe('Registration', function() {
|
||||
});
|
||||
|
||||
it("should show SSO options if those are available", async () => {
|
||||
jest.spyOn(SdkConfig, "get").mockReturnValue({
|
||||
disable_custom_urls: true,
|
||||
});
|
||||
|
||||
const root = render();
|
||||
|
||||
// Set non-empty flows & matrixClient to get past the loading spinner
|
||||
|
Reference in New Issue
Block a user