Proxyquire is a Node.js testing utility that lets developers override dependencies loaded through require. It allows a module under test to receive stubs in place of selected internal dependencies without modifying production code. Any methods not explicitly replaced can continue calling through to the original dependency by default. Strict no-call-through behavior can be enabled when complete isolation is required. The library is independent of a specific mocking framework, so it works with any tool capable of providing compatible stubs. Advanced options can simulate missing modules, reload modules, and override dependencies during initialization or runtime. Proxyquire is especially useful for focused unit tests of CommonJS modules with tightly coupled dependencies.

Features

  • CommonJS dependency overriding
  • No production code modifications required
  • Partial or complete dependency stubbing
  • Optional no-call-through behavior
  • Module reload and absence simulation
  • Mocking framework independence

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Proxyquire

Proxyquire Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Proxyquire!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Penetration Testing Tool

Registered

2026-09-23