From 168b758f6721cd1d6421cd10a8f05a1ff92ac71c Mon Sep 17 00:00:00 2001 From: David Ellingsworth Date: Tue, 16 Apr 2019 17:53:06 -0400 Subject: [PATCH] test(CustomFileInput): lists multiple files when supported --- src/__tests__/CustomInput.spec.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/__tests__/CustomInput.spec.js b/src/__tests__/CustomInput.spec.js index d9ed75e41..7eec0ce97 100644 --- a/src/__tests__/CustomInput.spec.js +++ b/src/__tests__/CustomInput.spec.js @@ -286,6 +286,23 @@ describe('Custom Inputs', () => { expect(file.find('.custom-file-label').text()).toBe('test.txt'); }); + + it('lists multiple files when supported', () => { + const file = mount(); + + file.find('input').hostNodes().simulate('change', { + target:{ + value:'C:\\fakepath\\file1.txt', + files:[ + {name:"file1.txt"}, + {name:'file2.txt'}, + {name:'file3.txt'}, + ] + } + }) + + expect(file.find('.custom-file-label').text()).toBe('file1.txt, file2.txt, file3.txt'); + }) }); describe('CustomRange', () => {