You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-09 08:42:50 +03:00
Conform more code to strict null checking (#10153)
* Conform more code to strict null checking * Conform more code to strict null checking * Iterate * Iterate
This commit is contained in:
committed by
GitHub
parent
a4ff959aa1
commit
145a5a8a8d
@@ -61,7 +61,7 @@ describe("<StyledRadioGroup />", () => {
|
||||
value: optionC.value,
|
||||
});
|
||||
|
||||
expect(getCheckedInput(component).value).toEqual(optionC.value);
|
||||
expect(getCheckedInput(component)?.value).toEqual(optionC.value);
|
||||
});
|
||||
|
||||
it("selects correct buttons when definitions have checked prop", () => {
|
||||
@@ -99,7 +99,7 @@ describe("<StyledRadioGroup />", () => {
|
||||
onChange,
|
||||
});
|
||||
|
||||
fireEvent.click(getInputByValue(component, optionB.value));
|
||||
fireEvent.click(getInputByValue(component, optionB.value)!);
|
||||
|
||||
expect(onChange).toHaveBeenCalledWith(optionB.value);
|
||||
});
|
||||
|
@@ -62,7 +62,7 @@ describe("<TooltipTarget />", () => {
|
||||
|
||||
const alignmentKeys = Object.keys(Alignment).filter((o: any) => isNaN(o));
|
||||
it.each(alignmentKeys)("displays %s aligned tooltip on mouseover", async (alignment: any) => {
|
||||
const wrapper = getComponent({ alignment: Alignment[alignment] });
|
||||
const wrapper = getComponent({ alignment: Alignment[alignment] })!;
|
||||
act(() => {
|
||||
Simulate.mouseOver(wrapper);
|
||||
});
|
||||
@@ -70,7 +70,7 @@ describe("<TooltipTarget />", () => {
|
||||
});
|
||||
|
||||
it("hides tooltip on mouseleave", () => {
|
||||
const wrapper = getComponent();
|
||||
const wrapper = getComponent()!;
|
||||
act(() => {
|
||||
Simulate.mouseOver(wrapper);
|
||||
});
|
||||
@@ -82,7 +82,7 @@ describe("<TooltipTarget />", () => {
|
||||
});
|
||||
|
||||
it("displays tooltip on focus", () => {
|
||||
const wrapper = getComponent();
|
||||
const wrapper = getComponent()!;
|
||||
act(() => {
|
||||
Simulate.focus(wrapper);
|
||||
});
|
||||
@@ -90,7 +90,7 @@ describe("<TooltipTarget />", () => {
|
||||
});
|
||||
|
||||
it("hides tooltip on blur", async () => {
|
||||
const wrapper = getComponent();
|
||||
const wrapper = getComponent()!;
|
||||
act(() => {
|
||||
Simulate.focus(wrapper);
|
||||
});
|
||||
|
Reference in New Issue
Block a user