# promise-null-object

> Node.js Promise Null Objects for Testing ========================================

Latest version **1.0.0** (published 2016-10-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install promise-null-object
pnpm add promise-null-object
yarn add promise-null-object
bun add promise-null-object
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-10-07 |
| First published | 2016-10-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | schlez |

## Links

- npm: https://www.npmjs.com/package/promise-null-object
- Repository: https://github.com/Schniz/promise-null-object
- Homepage: https://github.com/Schniz/promise-null-object#readme
- Issues: https://github.com/Schniz/promise-null-object/issues
- npm.io page: https://npm.io/package/promise-null-object

## Recent versions

- 1.0.0 (latest) — 2016-10-07

## README

Node.js Promise Null Objects for Testing
========================================

Inspired by RSpec's `stub.as_null_object`, this module returns a new ES2015 `Proxy` that will fulfill your promises.
Every property on the object returns a new, resolving promise. only `catch` and `then` will be the real implementation.
The main usage will be to mock things like `fetch` or anything that is promise-based.

Short usage
-----------
From the spec:

```js
const promiseNullObject = require('.');

it('works', () => {
  return promiseNullObject().a.b.c.d.e.f.g.h.i.then(e => e.a.b.c.d.ef.d.f.h());
});
```

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