This commit is contained in:
1 parent
9a9ab149ed
commit
5380bb66bb
3 files changed
+9
-5
No files matched your search
@@ -16,8 +16,8 @@ vi.mock("next/navigation", () => ({ useRouter: () => ({ push: vi.fn() }) }));
|
||||
describe("/cart route", () => {
|
||||
it("renders the cart experience and provides journey actions", () => {
|
||||
render(<CartPage />);
|
||||
expect(screen.getByRole("region", { name: "سبد خرید" })).toBeInTheDocument();
|
||||
expect(screen.getByRole("button", { name: "تکمیل سفارش" })).toBeInTheDocument();
|
||||
expect(screen.getByRole("button", { name: "مشاهده محصولات" })).toBeInTheDocument();
|
||||
expect(screen.getByRole("region", { name: "سبد خرید" })).toBeTruthy();
|
||||
expect(screen.getByRole("button", { name: "تکمیل سفارش" })).toBeTruthy();
|
||||
expect(screen.getByRole("button", { name: "مشاهده محصولات" })).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -11,6 +11,6 @@ vi.mock("next/navigation", () => ({ useRouter: () => ({ push: vi.fn() }) }));
|
||||
describe("/login route", () => {
|
||||
it("renders the authentication experience instead of a missing-page route", () => {
|
||||
render(<LoginPage />);
|
||||
expect(screen.getByRole("dialog")).toBeInTheDocument();
|
||||
expect(screen.getByRole("dialog")).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -6,7 +6,11 @@
|
||||
"dev": "next dev -p 3300",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "eslint"
|
||||
"lint": "eslint",
|
||||
"test": "vitest run --maxWorkers=2",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage --maxWorkers=2",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/dompurify": "^3.0.5",
|
||||
|
||||
Reference in new issue
Block a user