Best Proxyquire Alternatives ranked by AI · updated Aug 2026

βœ… Update queued β€” the AI is re-ranking this list. The page will refresh shortly.

This page is already up to date.

Proxyquire is a Node.js testing library for replacing dependencies loaded through CommonJS require calls. It is aimed at developers testing modules in isolation by supplying controlled substitutes for their collaborators.

Developer: Thorsten Lorenz and contributors Price: Free 🎯 github.com/thlorenz/proxyquire

Top 6 Proxyquire alternatives

1 Interpose.js logo

Interpose.js

Interpose.js contributors

Interpose.js is an open-source JavaScript library for intercepting and wrapping function calls. It is aimed at developers who need to add cross-cutting...

Pros

  • Focused API for function interception rather than a full testing framework
  • Can add behavior around existing functions without editing their implementation
  • Useful for lightweight logging, validation, and instrumentation layers

Cons

  • Smaller ecosystem than Sinon.JS and native JavaScript Proxy
  • Runtime wrapping can complicate stack traces and debugging
  • Requires careful handling of method context and asynchronous return values
3

Proxy is a software pattern that controls access to another object, acting as a surrogate or placeholder.

Pros

  • Security
  • Remote access

Cons

  • Complexity
  • Overhead
4

testdouble.js

testdouble.js contributors

testdouble.js is a JavaScript test-double library for creating stubs, spies, and verification-based mocks. It is intended for developers who want expressive test...

Pros

  • Clear API for stubbing and verifying function interactions
  • Supports both browser and Node.js testing environments
  • Provides automatic replacement helpers for common dependency patterns

Cons

  • Less appropriate for production middleware or instrumentation
  • Smaller ecosystem than Sinon.JS
  • Advanced module replacement may require additional tooling
5

Rewiremock

Kasper Peeters and contributors

Rewiremock is a JavaScript module-mocking library that replaces dependencies at load time. It targets Node.js and bundler-based projects that need flexible mocking...

Pros

  • Handles module replacement beyond direct function wrapping
  • Supports common JavaScript module-loading and bundler scenarios
  • Useful for isolating complex dependency graphs in tests

Cons

  • More configuration-heavy than Interpose.js for simple wrappers
  • Module-loader behavior can make failures difficult to diagnose
  • Primarily a testing tool rather than a production interception layer
6

AspectJS

AspectJS contributors

AspectJS is a TypeScript aspect-oriented programming framework for applying reusable advice to classes and methods. It is aimed at TypeScript teams that...

Pros

  • Provides a more structured AOP model than lightweight function wrappers
  • Designed for TypeScript decorators, classes, and method-level concerns
  • Better fit for large applications with repeated cross-cutting policies

Cons

  • Heavier conceptual and build-time footprint than Interpose.js
  • Primarily targets TypeScript and class-oriented code
  • Decorator and metadata configuration can increase debugging complexity

How good are these alternatives?

Your feedback helps us improve the AI rankings.

βœ… Thanks for your feedback!

Know a better alternative? πŸ™Œ

Suggest a product and our AI will verify it's a real alternative to Proxyquire before adding it to the list.