Fixed issue with extra colors of image input # 57 #58
@ -40,7 +40,7 @@ describe("ChipDetection", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.restoreAllMocks(); // Reset all mocks to prevent test contamination
|
jest.restoreAllMocks();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("renders correctly", () => {
|
it("renders correctly", () => {
|
||||||
@ -83,7 +83,11 @@ describe("ChipDetection", () => {
|
|||||||
fireEvent.press(getByText(/take a photo/i));
|
fireEvent.press(getByText(/take a photo/i));
|
||||||
|
|
||||||
await waitFor(() =>
|
await waitFor(() =>
|
||||||
expect(mockUpdateChipCount).toHaveBeenCalledWith({ red: 5, green: 3 })
|
expect(mockUpdateChipCount).toHaveBeenCalledWith({
|
||||||
|
red: 5,
|
||||||
|
green: 3,
|
||||||
|
blue: 0,
|
||||||
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -144,7 +148,7 @@ describe("ChipDetection", () => {
|
|||||||
choices: [
|
choices: [
|
||||||
{
|
{
|
||||||
message: {
|
message: {
|
||||||
content: JSON.stringify({ red: 5, green: 3 }),
|
content: JSON.stringify({ red: 5, green: 3, blue: 0 }),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -163,6 +167,7 @@ describe("ChipDetection", () => {
|
|||||||
expect(mockUpdateChipCount).toHaveBeenCalledWith({
|
expect(mockUpdateChipCount).toHaveBeenCalledWith({
|
||||||
red: 5,
|
red: 5,
|
||||||
green: 3,
|
green: 3,
|
||||||
|
blue: 0,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user