test(packages): avoid unsafe optional chaining

This commit is contained in:
Vincent Koc
2026-05-02 12:44:28 -07:00
parent e4aa4c7459
commit 6d4cf0cfe7
+3 -3
View File
@@ -5289,9 +5289,9 @@ describe("httpApiV1 handlers", () => {
}),
}),
);
const payload = (
runAction.mock.calls[0]?.[1] as { payload?: { files?: Array<{ path: string }> } }
).payload;
const actionCall = runAction.mock.calls[0];
expect(actionCall).toBeTruthy();
const payload = (actionCall[1] as { payload?: { files?: Array<{ path: string }> } }).payload;
expect(payload?.files?.map((file) => file.path)).not.toContain("dist/index.js");
});