diff --git a/core/src/components/toast/test/toast.spec.tsx b/core/src/components/toast/test/toast.spec.tsx index a0f812df1f2..961b2481166 100644 --- a/core/src/components/toast/test/toast.spec.tsx +++ b/core/src/components/toast/test/toast.spec.tsx @@ -93,6 +93,19 @@ describe('toast: a11y smoke test', () => { }); describe('toast: duration config', () => { + afterEach(() => { + /** + * Important: Reset the config + * after each test as it is not + * automatically reset. + * Otherwise, toasts in other tests + * will take on any toastDuration value + * set and timeouts will potentially run + * after tests are finished. + */ + config.reset({}); + }); + it('should have duration set to 0', async () => { const page = await newSpecPage({ components: [Toast],