summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordelucis2025-06-13 09:32:42 +0000
committerfredkbot2025-06-13 09:32:42 +0000
commitc4ce9086eb9d1a1dc3d23ec6abfa29b868b987ca (patch)
treef27ea67535ee12a42b95ced79cf2dc224eb3b2d6
parent95d124ae99f207afd83f305943fa29df32cbbfc9 (diff)
downloadIT.starlight-c4ce9086eb9d1a1dc3d23ec6abfa29b868b987ca.tar.gz
IT.starlight-c4ce9086eb9d1a1dc3d23ec6abfa29b868b987ca.tar.bz2
IT.starlight-c4ce9086eb9d1a1dc3d23ec6abfa29b868b987ca.zip
[ci] format
-rw-r--r--packages/starlight/__tests__/basics/starlight-page-route-data.test.ts18
-rw-r--r--packages/starlight/utils/starlight-page.ts2
2 files changed, 10 insertions, 10 deletions
diff --git a/packages/starlight/__tests__/basics/starlight-page-route-data.test.ts b/packages/starlight/__tests__/basics/starlight-page-route-data.test.ts
index bd9e1707..7e695175 100644
--- a/packages/starlight/__tests__/basics/starlight-page-route-data.test.ts
+++ b/packages/starlight/__tests__/basics/starlight-page-route-data.test.ts
@@ -612,15 +612,15 @@ test('fails to parse an image without the expected metadata properties', async (
});
test('adds data to route shape when the `docs` collection is not defined', async () => {
- // Mock the collection config in this test to simulate the absence of the `docs` collection.
- vi.doMock('virtual:starlight/collection-config', () => ({ collections: {} }));
+ // Mock the collection config in this test to simulate the absence of the `docs` collection.
+ vi.doMock('virtual:starlight/collection-config', () => ({ collections: {} }));
- const data = await generateStarlightPageRouteData({
- props: starlightPageProps,
- context: getRouteDataTestContext(starlightPagePathname),
- });
- expect(data.entry.data.title).toBe(starlightPageProps.frontmatter.title);
+ const data = await generateStarlightPageRouteData({
+ props: starlightPageProps,
+ context: getRouteDataTestContext(starlightPagePathname),
+ });
+ expect(data.entry.data.title).toBe(starlightPageProps.frontmatter.title);
- // Undo the mock to restore the original behavior.
- vi.doUnmock('virtual:starlight/collection-config');
+ // Undo the mock to restore the original behavior.
+ vi.doUnmock('virtual:starlight/collection-config');
});
diff --git a/packages/starlight/utils/starlight-page.ts b/packages/starlight/utils/starlight-page.ts
index 3f0ba6b9..c671145a 100644
--- a/packages/starlight/utils/starlight-page.ts
+++ b/packages/starlight/utils/starlight-page.ts
@@ -211,5 +211,5 @@ async function getUserDocsSchema(): Promise<
NonNullable<ContentConfig['collections']['docs']['schema']>
> {
const userCollections = (await import('virtual:starlight/collection-config')).collections;
- return userCollections?.docs?.schema ?? docsSchema();
+ return userCollections?.docs?.schema ?? docsSchema();
}