From e63a23335ebdf212e15846739146bffe14e61791 Mon Sep 17 00:00:00 2001 From: Liza K Date: Fri, 20 Mar 2020 00:05:28 +0200 Subject: [PATCH] added test --- src/core/public/notifications/toasts/toasts_api.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/public/notifications/toasts/toasts_api.test.ts b/src/core/public/notifications/toasts/toasts_api.test.ts index 7fa200dd7a111..7c0ef5576256a 100644 --- a/src/core/public/notifications/toasts/toasts_api.test.ts +++ b/src/core/public/notifications/toasts/toasts_api.test.ts @@ -154,8 +154,9 @@ describe('#addInfo()', () => { it('returns the created toast', async () => { const toasts = new ToastsApi(toastDeps()); - const toast = toasts.addInfo({}); + const toast = toasts.addInfo({}, { toastLifeTimeMs: 1 }); const currentToasts = await getCurrentToasts(toasts); + expect(currentToasts[0].toastLifeTimeMs).toBe(1); expect(currentToasts[0]).toBe(toast); }); });