Package Exports
- @mock-filelist/browser
Readme
@mock-filelist/browser
This package is a mock generator of FileList and File type object for ES Modules users.
[!IMPORTANT] Be sure to use the latest version.
Required Environment | Generatable Objects | Available Files | ||||
---|---|---|---|---|---|---|
File | FileList | File[] | Local Files | Files on the Internet | ||
@mock-filelist/filelist | Node + happy-dom | ✅ | ✅ | ✅ | ✅ | ✅ |
@mock-filelist/browser | Browser orNode + happy-dom |
✅ | ✅ | ✅ | ❌ | ✅ |
@mock-filelist/node | Node | ✅ | ❌ | ✅ | ✅ | ✅ |
[!WARNING] If you use
jsdom
instead ofhappy-dom
, you cannot use@mock-filelist/filelist
and@mock-filelist/browser
.
HTML Documentation
https://myxogastria0808.github.io/mock-filelist/browser/
Example (React + Vitest + happy-dom)
https://github.com/Myxogastria0808/mock-filelist/blob/main/examples/browser/
Test Result Generated by @vitest/coverage-v8
https://myxogastria0808.github.io/mock-filelist/browser/coverage/
Test Coverage Generated by @vitest/ui
https://myxogastria0808.github.io/mock-filelist/browser/ui/
How to Use
Coming Soon...