Skip to content

Commit

Permalink
increase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
RohinBhargava committed Jan 12, 2025
1 parent 7d83ab3 commit de2c846
Showing 1 changed file with 34 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}

0 comments on commit de2c846

Please sign in to comment.