Skip to content

Commit

Permalink
test(CustomFileInput): lists multiple files when supported
Browse files Browse the repository at this point in the history
  • Loading branch information
David Ellingsworth authored and David Ellingsworth committed Apr 16, 2019
1 parent edc0aa2 commit 168b758
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/__tests__/CustomInput.spec.js
Expand Up @@ -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(<CustomInput type="file" multiple/>);

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', () => {
Expand Down

0 comments on commit 168b758

Please sign in to comment.