From 48e1fbfb383600cc7a53f75acae322893717d9cb Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Mon, 7 Jan 2019 07:21:50 -0500 Subject: [PATCH] add unit test coverage for AnsibleSelect.jsx --- __tests__/components/AnsibleSelect.test.jsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/__tests__/components/AnsibleSelect.test.jsx b/__tests__/components/AnsibleSelect.test.jsx index d2eacf2129..5a225b804d 100644 --- a/__tests__/components/AnsibleSelect.test.jsx +++ b/__tests__/components/AnsibleSelect.test.jsx @@ -29,4 +29,16 @@ describe('', () => { wrapper.find('select').simulate('change'); expect(spy).toHaveBeenCalled(); }); -}); \ No newline at end of file + test('content not rendered when data property is falsey', () => { + const wrapper = mount( + { }} + labelName={label} + data={null} + /> + ); + expect(wrapper.find('FormGroup')).toHaveLength(0); + expect(wrapper.find('Select')).toHaveLength(0); + }); +});