huskies: merge 1120 story Silence intentional-error stderr in frontend tests so failures stand out
This commit is contained in:
@@ -160,6 +160,7 @@ describe("App", () => {
|
||||
});
|
||||
|
||||
it("shows error when openProject fails", async () => {
|
||||
const errorSpy = vi.spyOn(console, "error").mockImplementation(() => {});
|
||||
mockedApi.openProject.mockRejectedValue(new Error("Path does not exist"));
|
||||
|
||||
await renderApp();
|
||||
@@ -182,6 +183,7 @@ describe("App", () => {
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText(/Path does not exist/)).toBeInTheDocument();
|
||||
});
|
||||
errorSpy.mockRestore();
|
||||
});
|
||||
|
||||
it("shows known projects list", async () => {
|
||||
|
||||
Reference in New Issue
Block a user