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:
parent
a4ff959aa1
commit
145a5a8a8d
89 changed files with 520 additions and 551 deletions
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue