This package is a mock generator of FileList and File type object for ES Modules users.
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 | ✅ | ❌ | ✅ | ✅ | ✅ |
If you use jsdom instead of happy-dom, you cannot use @mock-filelist/filelist and @mock-filelist/browser.
https://myxogastria0808.github.io/mock-filelist/browser/
https://github.com/Myxogastria0808/mock-filelist/blob/main/examples/browser/
https://myxogastria0808.github.io/mock-filelist/browser/coverage/
https://myxogastria0808.github.io/mock-filelist/browser/ui/
Coming Soon...