All Projects → bahmutov → node-mock-examples

bahmutov / node-mock-examples

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

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-mock-examples

Hippolyte
HTTP Stubbing in Swift
Stars: ✭ 109 (+186.84%)
Mutual labels:  mock, test, stub
stub-server
Stub server for REST APIs
Stars: ✭ 14 (-63.16%)
Mutual labels:  mock, test, stub
Nx Admin
👍 A magical 🐮 ⚔ vue admin,记得star
Stars: ✭ 2,497 (+6471.05%)
Mutual labels:  mock, test
Vuex Mock Store
✅Simple and straightforward Vuex Store mock for vue-test-utils
Stars: ✭ 246 (+547.37%)
Mutual labels:  mock, test
mockingbird
🐦 Decorator Powered TypeScript Library for Creating Mocks
Stars: ✭ 70 (+84.21%)
Mutual labels:  mock, test
Spy
Clojure/ClojureScript library for stubs, spies and mocks.
Stars: ✭ 131 (+244.74%)
Mutual labels:  mock, stub
Mockingbird
Simplify software testing, by easily mocking any system using HTTP/HTTPS, allowing a team to test and develop against a service that is not complete or is unstable or just to reproduce planned/edge cases.
Stars: ✭ 149 (+292.11%)
Mutual labels:  mock, stub
aem-stubs
Tool for providing sample data for AEM applications in a simple and flexible way. Stubbing server on AEM, no separate needed.
Stars: ✭ 40 (+5.26%)
Mutual labels:  mock, stub
Prig
Prig is a lightweight framework for test indirections in .NET Framework.
Stars: ✭ 106 (+178.95%)
Mutual labels:  mock, test
dextool
Suite of C/C++ tooling built on LLVM/Clang
Stars: ✭ 81 (+113.16%)
Mutual labels:  mock, test
ts-mock-imports
Intuitive mocking library for Typescript class imports
Stars: ✭ 103 (+171.05%)
Mutual labels:  mock, stub
htest
htest is a http-test package
Stars: ✭ 24 (-36.84%)
Mutual labels:  mock, test
Nsubstitute
A friendly substitute for .NET mocking libraries.
Stars: ✭ 1,646 (+4231.58%)
Mutual labels:  mock, test
Mockit
A tool to quickly mock out end points, setup delays and more...
Stars: ✭ 1,534 (+3936.84%)
Mutual labels:  mock, stub
Mocktopus
Mocking framework for Rust
Stars: ✭ 179 (+371.05%)
Mutual labels:  mock, test
Mockery
Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL).
Stars: ✭ 10,048 (+26342.11%)
Mutual labels:  mock, stub
mocka
Mocka - The complete testing framework for LUA and Nginx
Stars: ✭ 26 (-31.58%)
Mutual labels:  mock, stub
FireMock
Mock and stub HTTP requests. Test your apps with fake data and files responses.
Stars: ✭ 25 (-34.21%)
Mutual labels:  mock, stub
Impersonator
Ruby library to record and replay object interactions
Stars: ✭ 100 (+163.16%)
Mutual labels:  mock, stub
Mimic
A mocking library for Elixir
Stars: ✭ 104 (+173.68%)
Mutual labels:  mock, stub

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].