From dbdfd2ae1e8b78d43fc0f21794158ffd53a3cfad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fauricio=20Rojas=20Hern=C3=A1ndez?= Date: Mon, 5 Feb 2018 13:01:01 -0600 Subject: [PATCH] Removed prop duration to avoid invalid html attributes for Toast (#1813) * Removed prop duration from Toast component to avoid invalid html attributes on prop tranfer * Increased test coverage --- __tests__/components/Toast-test.js | 1 + src/js/components/Toast.js | 1 + 2 files changed, 2 insertions(+) diff --git a/__tests__/components/Toast-test.js b/__tests__/components/Toast-test.js index 01d61dc3e0..e4d65e7dae 100644 --- a/__tests__/components/Toast-test.js +++ b/__tests__/components/Toast-test.js @@ -11,6 +11,7 @@ jest.mock('react-dom'); describe('Toast', () => { it('has correct default options', () => { + document.body.innerHTML = '
'; const component = renderer.create( diff --git a/src/js/components/Toast.js b/src/js/components/Toast.js index 2e0add9fbd..2d308a82f8 100644 --- a/src/js/components/Toast.js +++ b/src/js/components/Toast.js @@ -59,6 +59,7 @@ class ToastContents extends Component { const { closing } = this.state; // removing context props to avoid invalid html attributes on prop transfer + delete rest.duration; delete rest.history; delete rest.intl; delete rest.router;