# tiny-enzyme

> Minimal alternative of enzyme testing library

Latest version **0.0.4** (published 2017-12-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install tiny-enzyme
pnpm add tiny-enzyme
yarn add tiny-enzyme
bun add tiny-enzyme
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2017-12-31 |
| First published | 2017-12-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Marvin Hagemeister |
| Maintainers | marvinhagemeister |

## Links

- npm: https://www.npmjs.com/package/tiny-enzyme
- npm.io page: https://npm.io/package/tiny-enzyme

## Recent versions

- 0.0.4 (latest) — 2017-12-31
- 0.0.3 — 2017-12-31
- 0.0.2 — 2017-12-31
- 0.0.1 — 2017-12-31

## README

# Tiny Enzyme

Minimal alternative to [enzyme](https://github.com/airbnb/enzyme) for [preact](https://github.com/developit/preact/).

## Usage

Installation:

```bash
# npm
npm install --save-dev tiny-enzyme

# yarn
yarn add -D tiny-enzyme
```

Example test:

```jsx
import { h } from "preact";

descripe("Example suite", () => {
  it("should test something", () => {
    const spy = jest.fn();

    // Trigger a fake click
    mount(<div onClick={spy} />).simulate("click");

    // Check if our spy was called
    expect(spy.mocks.calls.length).toEqual(1);
  });
});
```

## License

MIT, see [License file](./LICENSE.md).

---
_Source: https://npm.io/package/tiny-enzyme · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
