This commit is contained in:
1 parent
1de8fd9a60
commit
bec76393bb
3 files changed
+25
-4
No files matched your search
@@ -144,6 +144,14 @@ const mockProducts = [
|
||||
});
|
||||
|
||||
describe("ArchivePage Component", () => {
|
||||
it("renders server-provided initial products without waiting for a client fetch", () => {
|
||||
render(<ArchivePage initialProducts={mockProducts as any} />);
|
||||
|
||||
expect(screen.getAllByText("گلوکوزامین مفاصل").length).toBeGreaterThan(0);
|
||||
expect(productService.getProducts).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
|
||||
|
||||
Reference in new issue
Block a user