10 Best Vanilla JavaScript Mocking Libraries

List hand-picked by Openbase Experts
Learn More

ng-mocks

Angular testing library for mocking components, directives, pipes, services and facilitating TestBed setup

267K
833
Built-in
MIT
sinon

Test spies, stubs and mocks for JavaScript.

5.6M
9.3K
DefinitelyTyped
BSD-3-Clause
fak

What really happened with Aaron Swartz?

2.5M
1.6K
DefinitelyTyped
MIT
ama

Axios adapter that allows to easily mock requests

963K
3.1K
Built-in
MIT
jso

A simple online fake REST API server

36
4.5K
No support
MIT
jma

Axios mock for Jest

147K
235
Built-in
MIT
jlm

A module to mock window.localStorage and window.sessionStorage in Jest

458K
300
No support
BSD-3-Clause
testdouble

A minimal test double library for TDD with JavaScript

66.1K
1.4K
Built-in
MIT
ms

Javascript mocking library for WebSockets and Socket.IO

501K
728
No support
MIT
xm

Utility for mocking XMLHttpRequest.

312K
192
Built-in
MIT
mk

a knex mock adapter for simulating a db during testing

34.1K
DefinitelyTyped
MIT
mimic

Seamless client side mocking

5.6K
385
No support
MIT
lineman

Lineman helps you build fat-client JavaScript apps. It produces happiness by building assets, mocking servers, running specs on every file change

3.2K
1.2K
No support
MIT
kakapo

🐦 Next generation mocking framework in Javascript

117
532
Built-in
MIT
service-mocker

🚀 Next generation frontend API mocking framework

87
1K
Built-in
MIT
Description
Author
License
Type Definitions
ESM Support
Tree Shakeable
Popularity
Downloads/wk
GitHub Stars
Reviews
User Rating
Voted Good Docs
Voted Easy of Use
Voted Performant
Top Positive Review
Top Negative Review
Issues
Total Issues
Open Issues
Avg Time to Close
Pull Requests
Total Pull Requests
Open Pull Requests
Avg Time to Merge
Community
Maintainers
Contributors
Contributors with 3+ commits
Top Committers
GitHub Forks
Versions
# of Versions
Latest
Next
Beta
Newest
Oldest
Major Every
Minor Every
Patch Every
Dependencies
Dependencies
Dev Dependencies
Links
More Info
README
Tutorials
Install Command
There's Nothing Here
No packages are selected.
Select a few packages to compare.