fix(ci): split unit/integration tests and fix landing test failures

- Separate unit tests (fast, no system deps) from integration test
  shards to prevent vi.mock db leakage across test types
- Fix hero test: update expected subtitle to match current copy
- Fix FAQ test: add missing json-ld alias in vitest config and mock
- Integration tests run in 4 parallel shards (30min timeout each)
This commit is contained in:
SnapOtter
2026-05-16 19:12:43 +08:00
parent d886cc2486
commit 1fb2802eea
4 changed files with 19 additions and 5 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ describe("Hero", () => {
it("renders the subheadline", () => {
render(<Hero />);
expect(screen.getByText("Every image tool you need.")).toBeDefined();
expect(screen.getByText(/free, open-source image toolkit/)).toBeDefined();
});
it("renders the CTA button linking to GitHub", () => {
+4
View File
@@ -19,6 +19,10 @@ vi.mock("@/components/navbar", () => ({
Navbar: () => <nav data-testid="navbar" />,
}));
vi.mock("@/components/json-ld", () => ({
JsonLd: () => null,
}));
vi.mock("framer-motion", () => ({
motion: {
div: ({ children, ...props }: React.PropsWithChildren<Record<string, unknown>>) => (