An open API service indexing awesome lists of open source software.

https://github.com/harrymt/js-mocking-demo

Example of how to use Stubs, Spies for Mocking JavaScript tests.
https://github.com/harrymt/js-mocking-demo

javascript javascript-tests mocha mock sinonjs spies stub

Last synced: 9 days ago
JSON representation

Example of how to use Stubs, Spies for Mocking JavaScript tests.

Awesome Lists containing this project

README

          

# JavaScript Mocking

Example of how to use Stubs, Spies and Mocks for JavaScript tests.

[Blog Post](https://www.harrymt.com/blog/2018/04/11/stubs-spies-and-mocks-in-js.html) describes how to use this repo.

### Technologies

- [SinonJS](http://sinonjs.org/) (Pronounced "sigh-non")
- [MochaJS](http://mochajs.org)

### Install

```
$ yarn
```

### Basic In-memory storage

Run basic program.

```
$ yarn start
```

Run tests.

```
$ yarn test
```

### Further Reading

- [SinonJS docs](http://sinonjs.org/)