Apply lint rule @typescript-eslint/no-empty-object-type (#29159)
* Apply lint rule @typescript-eslint/no-empty-object-type To avoid the footgun that is https://www.totaltypescript.com/the-empty-object-type-in-typescript Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
8cae1e9f5e
commit
7eb969bbc2
@@ -14,10 +14,7 @@ import SettingsStore from "../../../../../../../src/settings/SettingsStore";
|
||||
import SdkConfig from "../../../../../../../src/SdkConfig";
|
||||
|
||||
describe("<LabsUserSettingsTab />", () => {
|
||||
const defaultProps = {
|
||||
closeSettingsFn: jest.fn(),
|
||||
};
|
||||
const getComponent = () => <LabsUserSettingsTab {...defaultProps} />;
|
||||
const getComponent = () => <LabsUserSettingsTab />;
|
||||
|
||||
const settingsValueSpy = jest.spyOn(SettingsStore, "getValue");
|
||||
|
||||
|
||||
@@ -1104,8 +1104,9 @@ describe("<SessionManagerTab />", () => {
|
||||
// because promise flushing after the confirm modal is resolving this too
|
||||
// and we want to test the loading state here
|
||||
const resolveDeleteRequest = defer<IAuthData>();
|
||||
mockClient.deleteMultipleDevices.mockImplementation(() => {
|
||||
return resolveDeleteRequest.promise;
|
||||
mockClient.deleteMultipleDevices.mockImplementation(async () => {
|
||||
await resolveDeleteRequest.promise;
|
||||
return {};
|
||||
});
|
||||
|
||||
const { getByTestId } = render(getComponent());
|
||||
|
||||
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { waitFor, renderHook, act } from "jest-matrix-react";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { EmptyObject, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { useProfileInfo } from "../../../src/hooks/useProfileInfo";
|
||||
import { MatrixClientPeg } from "../../../src/MatrixClientPeg";
|
||||
@@ -93,7 +93,7 @@ describe("useProfileInfo", () => {
|
||||
});
|
||||
|
||||
it("should be able to handle an empty result", async () => {
|
||||
cli.getProfileInfo = () => null as unknown as Promise<{}>;
|
||||
cli.getProfileInfo = () => null as unknown as Promise<EmptyObject>;
|
||||
const query = "@user:home.server";
|
||||
|
||||
const { result } = render();
|
||||
|
||||
Reference in New Issue
Block a user