# must-return

> Function return value assertions for must.js

Latest version **1.0.1** (published 2017-01-28) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install must-return
pnpm add must-return
yarn add must-return
bun add must-return
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-01-28 |
| First published | 2017-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jacek Nowacki |
| Maintainers | dzek69 |

## Links

- npm: https://www.npmjs.com/package/must-return
- Repository: https://github.com/dzek69/must-return
- Homepage: https://github.com/dzek69/must-return#readme
- Issues: https://github.com/dzek69/must-return/issues
- npm.io page: https://npm.io/package/must-return

## Recent versions

- 1.0.1 (latest) — 2017-01-28
- 1.0.0 — 2017-01-22

## README

# must-return

Add function return value assertions to Must.js

# Install 
```
npm install must-return
```

# Usage

```javascript
require("must-return"); // This will internally require must and upgrade its prototype.

const return100 = () => {
    return 100;
};

describe("Testing must returns", () => {
    it("must be a huge success", () => {
        return100.must.return(100);
    });

    it("will fail", () => {
        return100.must.return("100");
    });
});
```

# Note

Value comparison is done with `===`, so in most cases you won't be able to test expected object return, as references
will be different. I'm still new to Must.js and I'm looking for a way to make `return` to be a pass-through, just like
`resolve`, so you will be able to do `return100.must.return.eql({})` (looking for smoother to read naming too).

Feel free to suggest something or even open a PR.

# License 

MIT

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