Skip to content

Commit

Permalink
fix(html): increased ALL sleep times because CI is slow
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette committed Mar 26, 2024
1 parent f141e58 commit 0bee1e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/fastify-html-plugin/test/stream-html.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { setTimeout } from 'node:timers/promises';
import { fastifyKitaHtml } from '..';

async function SleepForMs({ ms, children }: PropsWithChildren<{ ms: number }>) {
await setTimeout(ms * 2);
await setTimeout(ms * 50);
return Html.contentsToString([children || String(ms)]);
}

Expand Down Expand Up @@ -309,7 +309,7 @@ describe('Suspense', () => {
<div>
{Array.from({ length: seconds }, (_, i) => (
<Suspense rid={req.id} fallback={<div>{seconds - i} loading</div>}>
<SleepForMs ms={(seconds - i) * 100}>{seconds - i}</SleepForMs>
<SleepForMs ms={seconds - i}>{seconds - i}</SleepForMs>
</Suspense>
))}
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/html/test/suspense.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Html, { PropsWithChildren } from '../index';
import { Suspense, SuspenseScript, renderToStream, renderToString } from '../suspense';

async function SleepForMs({ ms, children }: PropsWithChildren<{ ms: number }>) {
await setTimeout(ms * 2);
await setTimeout(ms * 50);
return Html.contentsToString([children || String(ms)]);
}

Expand Down Expand Up @@ -226,7 +226,7 @@ describe('Suspense', () => {
<div>
{Array.from({ length: seconds }, (_, i) => (
<Suspense rid={r} fallback={<div>{seconds - i} loading</div>}>
<SleepForMs ms={(seconds - i) * 100}>{seconds - i}</SleepForMs>
<SleepForMs ms={seconds - i}>{seconds - i}</SleepForMs>
</Suspense>
))}
</div>
Expand Down

0 comments on commit 0bee1e9

Please sign in to comment.