Node Mock Examples Save

Examples of tests that mock Node system APIs: fs, http, child_process, timers

Project README

node-mock-examples

Examples of tests that mock Node system APIs: fs, http, child_process, timers

Build status

Practical working test examples for blog post Mock system APIs. Because mocking the stable, well documented Node system APIs is easier than stubbing your own internal code. And simpler to update in the future!

Mocking examples

All examples use Mocha test framework, but do not rely on anything Mocha-specific.

Have a suggestion or an example to add?

File an issue!

Small print

Author: Gleb Bahmutov [email protected] © 2017

License: MIT - do anything with the code, but don't blame me if it does not work.

Open Source Agenda is not affiliated with "Node Mock Examples" Project. README Source: bahmutov/node-mock-examples
Stars
40
Open Issues
2
Last Commit
6 years ago

Open Source Agenda Badge

Open Source Agenda Rating