File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
docs/svelte-testing-library Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ id : faq
3
+ title : FAQ
4
+ sidebar_label : FAQ
5
+ ---
6
+
7
+ - [ Testing file upload component] ( #testing-file-upload-component )
8
+
9
+ ---
10
+
11
+ ## Testing file upload component
12
+
13
+ File upload handler not triggering? Use ` happy-dom ` , not ` jsdom ` , and make
14
+ sure to use ` fireEvent.change(...) ` and not ` fireEvent.input(...) ` . It seems
15
+ that jsdom (which is at v22.1.0 at the time of this writing) doesn't fake all
16
+ the File object as it should.
17
+
18
+
19
+ See [ svelte-testing-library's issue
20
+ 219] ( https://github.com/testing-library/svelte-testing-library/issues/219 ) for
21
+ more details.
22
+
Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ module.exports = {
161
161
'svelte-testing-library/setup' ,
162
162
'svelte-testing-library/example' ,
163
163
'svelte-testing-library/api' ,
164
+ 'svelte-testing-library/faq' ,
164
165
] ,
165
166
} ,
166
167
'cypress-testing-library/intro' ,
You can’t perform that action at this time.
0 commit comments