Skip to content

bahmutov/node-mock-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 <gleb.bahmutov@gmail.com> © 2017

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published