-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for file inputs to snaps-jest
#2494
Conversation
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
f2a04bd
to
afa01aa
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2494 +/- ##
==========================================
+ Coverage 94.36% 94.38% +0.02%
==========================================
Files 441 441
Lines 9068 9106 +38
Branches 1396 1405 +9
==========================================
+ Hits 8557 8595 +38
Misses 511 511 ☔ View full report in Codecov by Sentry. |
c1f38b8
to
d426571
Compare
id, | ||
); | ||
|
||
const fileObject = await getFileToUpload(file, options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should reject files that are too large here, similar to how we will have to do in the client
d426571
to
f68c22e
Compare
This adds a new method
uploadFile
to the interface object returned bysnaps-jest
, to "upload" a file to the Snap. This simulates the file input component.