Skip to content

Commit

Permalink
set timeout before setup and benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
phanen committed Nov 17, 2023
1 parent 280d2f5 commit b6fa5fd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ describe('TypeScript Plugin Performance Tests', () => {
return { plugin, document, append, prepend };
}

it('should be fast enough', async function() {
const { document, plugin, append, prepend } = setup('performance.svelte');

it('should be fast enough', async function () {
// allow to set a higher timeout for slow machines from cli flag
const performanceTimeout = Math.max(this.timeout(), 25_000);
this.timeout(performanceTimeout);

const { document, plugin, append, prepend } = setup('performance.svelte');

const benchmarkElapse = Math.ceil(await benchmark());
// it usually takes around 5-6 times of the benchmark result
// plus 1 for the benchmark itself
Expand Down

0 comments on commit b6fa5fd

Please sign in to comment.