From fd208ddcaf26612208d6306a16b0f2ddab2a3e95 Mon Sep 17 00:00:00 2001 From: Omer Priel Date: Tue, 21 Nov 2023 13:53:05 +0200 Subject: [PATCH 1/2] update testTimeout from 5 seconds to 10 seconds --- vite.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/vite.config.ts b/vite.config.ts index 080ff981f5..635c525c4e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -24,6 +24,7 @@ export default defineConfig({ reportsDirectory: './coverage/vitest', exclude: ['**/node_modules/**', '**/tests/**', '**/__mocks__/**'], }, + testTimeout: 10000, }, build: { /** If you set esmExternals to true, this plugins assumes that From 9ae00ebcdb7541cbb039c06af175a5c00e96cb83 Mon Sep 17 00:00:00 2001 From: Omer Priel Date: Thu, 23 Nov 2023 14:55:09 +0200 Subject: [PATCH 2/2] reset the testTimeout to 5 seconds and change it directly in the test --- packages/mermaid/src/mermaid.spec.ts | 2 +- vite.config.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/mermaid/src/mermaid.spec.ts b/packages/mermaid/src/mermaid.spec.ts index 645b5b39cb..87756dc4db 100644 --- a/packages/mermaid/src/mermaid.spec.ts +++ b/packages/mermaid/src/mermaid.spec.ts @@ -89,7 +89,7 @@ describe('when using mermaid and ', () => { ).resolves.not.toThrow(); // should still render, even if lazyLoadedDiagrams fails expect(mermaidAPI.render).toHaveBeenCalled(); - }); + }, 20_000); it('should defer diagram load based on parameter', async () => { let loaded = false; diff --git a/vite.config.ts b/vite.config.ts index 635c525c4e..080ff981f5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -24,7 +24,6 @@ export default defineConfig({ reportsDirectory: './coverage/vitest', exclude: ['**/node_modules/**', '**/tests/**', '**/__mocks__/**'], }, - testTimeout: 10000, }, build: { /** If you set esmExternals to true, this plugins assumes that