From 0fce6dd8215195371bbeef16932b4124cdfa0e20 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 24 Jan 2021 18:05:37 +0100 Subject: [PATCH] Fixed warnings in DropdownBtn test --- test/utils/DropdownBtn.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/utils/DropdownBtn.test.tsx b/test/utils/DropdownBtn.test.tsx index 79722689..2076f6ec 100644 --- a/test/utils/DropdownBtn.test.tsx +++ b/test/utils/DropdownBtn.test.tsx @@ -6,7 +6,7 @@ import { DropdownBtn, DropdownBtnProps } from '../../src/utils/DropdownBtn'; describe('', () => { let wrapper: ShallowWrapper; const createWrapper = (props: PropsWithChildren) => { - wrapper = shallow(); + wrapper = shallow(); return wrapper; }; @@ -17,7 +17,7 @@ describe('', () => { const wrapper = createWrapper({ text }); const toggle = wrapper.find(DropdownToggle); - expect(toggle.html()).toContain(text); + expect(toggle.prop('children')).toContain(text); }); it.each([[ 'foo' ], [ 'bar' ], [ 'baz' ]])('displays provided children', (children) => {