diff --git a/packages/language-server/test/plugins/typescript/typescript-performance.test.ts b/packages/language-server/test/plugins/typescript/typescript-performance.test.ts index e1bdbb7fc..305c8fc02 100644 --- a/packages/language-server/test/plugins/typescript/typescript-performance.test.ts +++ b/packages/language-server/test/plugins/typescript/typescript-performance.test.ts @@ -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