Fix DeboardingPanel test to use destructuring for exactOptionalPropertyTypes
This commit is contained in:
@@ -53,13 +53,15 @@ describe("DeboardingPanel", () => {
|
||||
});
|
||||
|
||||
it("omits terminal row when arrival has no terminal", () => {
|
||||
const noTerminal = { ...arrival, terminal: undefined };
|
||||
const { terminal, ...noTerminal } = arrival;
|
||||
void terminal;
|
||||
render(<DeboardingPanel item={baseItem} arrival={noTerminal} />);
|
||||
expect(screen.queryByText("DETAILS.TERMINAL")).toBeNull();
|
||||
});
|
||||
|
||||
it("omits bag belt row when arrival has no bagBelt", () => {
|
||||
const noBelt = { ...arrival, bagBelt: undefined };
|
||||
const { bagBelt, ...noBelt } = arrival;
|
||||
void bagBelt;
|
||||
render(<DeboardingPanel item={baseItem} arrival={noBelt} />);
|
||||
expect(screen.queryByText("DETAILS.BAG_BELT")).toBeNull();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user