From de2c846430d82a966187dac703b346909637c509 Mon Sep 17 00:00:00 2001 From: Rohin Bhargava Date: Sun, 12 Jan 2025 18:52:03 -0500 Subject: [PATCH] increase timeout --- .../src/algolia/__test__/generation.test.ts | 64 ++++++++++--------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/packages/fern-docs/search-server/src/algolia/__test__/generation.test.ts b/packages/fern-docs/search-server/src/algolia/__test__/generation.test.ts index 4ff2e3ab24..5a9bf6a8dc 100644 --- a/packages/fern-docs/search-server/src/algolia/__test__/generation.test.ts +++ b/packages/fern-docs/search-server/src/algolia/__test__/generation.test.ts @@ -47,39 +47,43 @@ for (const fixtureName of [ "no-version-yes-tabs", ]) { // eslint-disable-next-line vitest/valid-title - describe(fixtureName, () => { - it("should work", async () => { - const fixture = readFixture(fixtureName); - const mockGetPresignedDocsAssetsDownloadUrl = vi.fn(); - const root = FernNavigation.utils.toRootNode(fixture); - const apis = await FernNavigation.utils.toApis( - fixture, - mockGetPresignedDocsAssetsDownloadUrl - ); - const pages = FernNavigation.utils.toPages(fixture); + describe( + fixtureName, + () => { + it("should work", async () => { + const fixture = readFixture(fixtureName); + const mockGetPresignedDocsAssetsDownloadUrl = vi.fn(); + const root = FernNavigation.utils.toRootNode(fixture); + const apis = await FernNavigation.utils.toApis( + fixture, + mockGetPresignedDocsAssetsDownloadUrl + ); + const pages = FernNavigation.utils.toPages(fixture); - const { records, tooLarge } = createAlgoliaRecords({ - root, - domain: "test.com", - org_id: "test", - pages, - apis, - }); + const { records, tooLarge } = createAlgoliaRecords({ + root, + domain: "test.com", + org_id: "test", + pages, + apis, + }); - expect(tooLarge.length).toBe(0); + expect(tooLarge.length).toBe(0); - records.forEach((record) => { - if (record.description != null) { - expect(record.description.length).toBeLessThanOrEqual(50_000); - } + records.forEach((record) => { + if (record.description != null) { + expect(record.description.length).toBeLessThanOrEqual(50_000); + } - if (record.type === "markdown" && record.content != null) { - expect(record.content.length).toBeLessThanOrEqual(50_000); - } + if (record.type === "markdown" && record.content != null) { + expect(record.content.length).toBeLessThanOrEqual(50_000); + } + }); + await expect(JSON.stringify(records, null, 2)).toMatchFileSnapshot( + path.join("__snapshots__", `${fixtureName}.test.ts.json`) + ); }); - await expect(JSON.stringify(records, null, 2)).toMatchFileSnapshot( - path.join("__snapshots__", `${fixtureName}.test.ts.json`) - ); - }); - }); + }, + 25_000 + ); }