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

# @mock-filelist/filelist

[![Test](https://github.com/Myxogastria0808/mock-filelist/actions/workflows/filelist-test.yaml/badge.svg)](https://github.com/Myxogastria0808/mock-filelist/actions/workflows/filelist-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/filelist.svg)](https://www.npmjs.com/package/@mock-filelist/filelist)
![GitHub Release](https://img.shields.io/github/v/release/Myxogastria0808/mock-filelist)
![NPM Type Definitions](https://img.shields.io/npm/types/@mock-filelist/filelist)
[![Download NPM](https://img.shields.io/npm/dm/@mock-filelist/filelist.svg?style=flat)](https://www.npmjs.com/package/@mock-filelist/filelist)
![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><strong>@mock-filelist/filelist</strong></td>
            <td>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/browser/">@mock-filelist/browser</a></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/filelist/

## Example (React + Vitest + **happy-dom**)

https://github.com/Myxogastria0808/mock-filelist/blob/main/examples/filelist/

## Test Result Generated by @vitest/coverage-v8

https://myxogastria0808.github.io/mock-filelist/filelist/coverage/

## Test Coverage Generated by @vitest/ui

https://myxogastria0808.github.io/mock-filelist/filelist/vitest/

## How to Use

Coming Soon...