style: format notebook contracts
This commit is contained in:
1 parent
8b858528f8
commit
c66ff7fde6
3 files changed
+79
-23
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { portfolio, type PortfolioProject } from "@/lib/portfolio-data";
|
||||
import { type PortfolioProject, portfolio } from "@/lib/portfolio-data";
|
||||
import { selectNotebookProjects } from "./notebookProjects";
|
||||
|
||||
const projectsFixture = portfolio.projects as PortfolioProject[];
|
||||
@@ -13,7 +13,11 @@ describe("selectNotebookProjects", () => {
|
||||
"sev-modaintima",
|
||||
"as-servicos",
|
||||
]);
|
||||
expect(result.every((project) => project.screenshotSrc.startsWith("/assets/prints/"))).toBe(true);
|
||||
expect(
|
||||
result.every((project) =>
|
||||
project.screenshotSrc.startsWith("/assets/prints/"),
|
||||
),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("omits a project when its screenshot mapping is missing", () => {
|
||||
@@ -22,15 +26,16 @@ describe("selectNotebookProjects", () => {
|
||||
{ ...projectsFixture[0], id: "unknown-live-project" },
|
||||
]);
|
||||
|
||||
expect(result.some((project) => project.id === "unknown-live-project")).toBe(false);
|
||||
expect(
|
||||
result.some((project) => project.id === "unknown-live-project"),
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("omits a project without an approved demo URL", () => {
|
||||
const result = selectNotebookProjects(
|
||||
projectsFixture.map((project) =>
|
||||
project.id === "nutriscan" ? { ...project, demoUrl: null } : project,
|
||||
),
|
||||
);
|
||||
const projectsWithoutDemoUrl = projectsFixture.map((project) =>
|
||||
project.id === "nutriscan" ? { ...project, demoUrl: null } : project,
|
||||
) as unknown as PortfolioProject[];
|
||||
const result = selectNotebookProjects(projectsWithoutDemoUrl);
|
||||
|
||||
expect(result.some((project) => project.id === "nutriscan")).toBe(false);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user