Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/chunking.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe("experimental.chunks", () => {
// Parse manifest - extract JSON from the generated code
const manifestMatch = manifestCode?.match(/export const plaindownManifest = ({[\s\S]*?});/);
expect(manifestMatch).toBeDefined();
const manifest = JSON.parse(manifestMatch?.[1]);
const manifest = JSON.parse(manifestMatch?.[1] as string);

// Check chunk mappings
expect(manifest.config.chunks).toBeDefined();
Expand Down Expand Up @@ -78,7 +78,7 @@ describe("experimental.chunks", () => {
const manifestCode = (await load(plugin, "\0virtual:plaindown")) as string;
const manifestMatch = manifestCode?.match(/export const plaindownManifest = ({[\s\S]*?});/);
expect(manifestMatch).toBeDefined();
const manifest = JSON.parse(manifestMatch?.[1]);
const manifest = JSON.parse(manifestMatch?.[1] as string);

expect(manifest.config.chunks["no-category.md"]).toBe("_default");
expect(manifest.config.chunks["with-category.md"]).toBe("blog");
Expand Down Expand Up @@ -143,7 +143,7 @@ describe("experimental.chunks", () => {
const manifestCode = (await load(plugin, "\0virtual:plaindown")) as string;
const manifestMatch = manifestCode?.match(/export const plaindownManifest = ({[\s\S]*?});/);
expect(manifestMatch).toBeDefined();
const manifest = JSON.parse(manifestMatch?.[1]);
const manifest = JSON.parse(manifestMatch?.[1] as string);

expect(manifest.config.chunks["post.md"]).toBe("async");
});
Expand Down Expand Up @@ -189,7 +189,7 @@ describe("experimental.chunks", () => {
const manifestCode = (await load(plugin, "\0virtual:plaindown")) as string;
const manifestMatch = manifestCode?.match(/export const plaindownManifest = ({[\s\S]*?});/);
expect(manifestMatch).toBeDefined();
const manifest = JSON.parse(manifestMatch?.[1]);
const manifest = JSON.parse(manifestMatch?.[1] as string);

expect(manifest.config.chunks["blog-post.md"]).toBe("blog");
expect(manifest.config.chunks["docs-page.md"]).toBe("docs");
Expand Down
Loading