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

# @mock-filelist/node

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

## Example (Mock Service Worker + Vitest)

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

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

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

## Test Coverage Generated by @vitest/ui

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

## How to Use

Coming Soon...