Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yosuke-furukawa/must-call
example.on('end', mustCall(() => {})); Check the callback function is called.
https://github.com/yosuke-furukawa/must-call
Last synced: about 1 month ago
JSON representation
example.on('end', mustCall(() => {})); Check the callback function is called.
- Host: GitHub
- URL: https://github.com/yosuke-furukawa/must-call
- Owner: yosuke-furukawa
- Created: 2016-04-21T19:35:54.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-11-20T12:46:15.000Z (almost 2 years ago)
- Last Synced: 2024-10-10T12:13:55.891Z (about 1 month ago)
- Language: JavaScript
- Size: 112 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
must-call
==================
[![npm version](https://badge.fury.io/js/must-call.svg)](https://badge.fury.io/js/must-call)
[![Build Status](https://travis-ci.org/yosuke-furukawa/must-call.svg?branch=master)](https://travis-ci.org/yosuke-furukawa/must-call)`must-call` is an assertion library for async test.
This method is inspired from `node.js` project `test/common.js`.```js
const mustCall = require('must-call');someCallback(mustCall(() => {
// when callback does not called at the end of the process,
// throw exception.
}));somePromiseTest().then(mustCall(() => {
// when async test does not resolved at the end of the process,
// throw exception.
}));
```![image](./images/example.png)