# assert-that

> JavaScript mocking library with super-simple syntax

Latest version **0.0.1** (published 2017-04-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install assert-that
pnpm add assert-that
yarn add assert-that
bun add assert-that
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-04-22 |
| First published | 2017-04-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Aleksander Świtalski |
| Maintainers | aswitalski |
| Keywords | javascript, mocking, testing, assert, mock |

## Links

- npm: https://www.npmjs.com/package/assert-that
- Repository: https://github.com/aswitalski/assert-that
- Homepage: https://github.com/aswitalski/assert-that#readme
- Issues: https://github.com/aswitalski/assert-that/issues
- npm.io page: https://npm.io/package/assert-that

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2017-04-22

## README

# assert-that
JavaScript mocking library with super-simple syntax.

# Syntax

``` js
const node = shallowRender(template);

assert.that(node.firstChild.isElement().hasName('div').hasId());
assert.that(node.lastChild.isComponent(MyComponent).withChild(Element));

assert.that(element.children() > 5);
assert.that(element.children(MyComponent, { label: /Choose/ }) >= 1);

assert.that(component.services() == 3);
assert.that(component.services(OtherService));

assert.that(element.children().find(MyComponent, OtherComponent, 'div'));
assert.that(element.children().filter({ class: 'some-name' }) == 2);
```

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