npm package: @mock-filelist/browser
Description: This package is a mock generator of FileList and File type object for ESModules users.
Author: Myxogastria0808
Latest version: 0.0.1

# @mock-filelist/browser

[![Test](https://github.com/Myxogastria0808/mock-filelist/actions/workflows/browser-test.yaml/badge.svg)](https://github.com/Myxogastria0808/mock-filelist/actions/workflows/browser-test.yaml)
[![Docs](https://github.com/Myxogastria0808/mock-filelist/actions/workflows/docs.yaml/badge.svg)](https://github.com/Myxogastria0808/mock-filelist/actions/workflows/docs.yaml)
[![NPM Version](https://img.shields.io/npm/v/@mock-filelist/browser.svg)](https://www.npmjs.com/package/@mock-filelist/browser)
![GitHub Release](https://img.shields.io/github/v/release/Myxogastria0808/mock-filelist)
![NPM Type Definitions](https://img.shields.io/npm/types/@mock-filelist/browser)
[![Download NPM](https://img.shields.io/npm/dm/@mock-filelist/browser.svg?style=flat)](https://www.npmjs.com/package/@mock-filelist/browser)
![GitHub License](https://img.shields.io/github/license/Myxogastria0808/mock-filelist)
![Vitest](https://img.shields.io/badge/-vitest-6e9f18?style=flat&logo=vitest&logoColor=ffffff)
![Typedoc](https://img.shields.io/badge/docs-typedoc-blue?style=flat-square&logo=typescript&logoColor=white)
[![RenovateBot](https://img.shields.io/badge/RenovateBot-1A1F6C?logo=renovate&logoColor=fff)](#)

This package is a mock generator of FileList and File type object for ES Modules users.

> [!IMPORTANT]
> Be sure to use the latest version.

<table>
    <tbody>
        <tr>
            <th rowspan="2"></th>
            <th rowspan="2">Required Environment</th>
            <th colspan="3">Generatable Objects</th>
            <th colspan="2">Available Files</th>
        </tr>
        <tr>
            <th>File</th>
            <th>FileList</th>
            <th>File[]</th>
            <th>Local Files</th>
            <th>Files on the Internet</th>
        </tr>
        <tr>
            <td><a href="https://www.npmjs.com/package/@mock-filelist/filelist/">@mock-filelist/filelist</a></td>
            <td>Node + happy-dom</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td><strong>@mock-filelist/browser</strong></td>
            <td>Browser<br/>or</br/>Node + happy-dom</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>❌</td>
            <td>✅</td>
        </tr>
        <tr>
            <td><a href="https://www.npmjs.com/package/@mock-filelist/node/">@mock-filelist/node</a></td>
            <td>Node</td>
            <td>✅</td>
            <td>❌</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
    </tbody>
</table>

> [!WARNING]
> If you use `jsdom` instead of `happy-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...