# testdouble.js

JavaScript test double library for replacing dependencies in tests and verifying the calls made to them, for Node.js and browsers.


Source: https://findsoftware.frbit.cloud/testdouble/
Last reviewed: 2026-11-16
Updated: 2026-11-17
Listed since: 2026-11-16

## Record

### Links

- repository: https://github.com/testdouble/testdouble.js
- docs: https://github.com/testdouble/testdouble.js/tree/main/docs

### Identity

- status: active
- maintainer: Test Double, LLC
- maintainerType: company
- parent: unknown
- firstRelease: 2015
- hqCountry: unknown

### Kind

- category: testing
- hosting: not applicable
- language: javascript
- runtime: node
- runtimeMin: node 22
- basedOn: unknown

### Content

- contentStore: not applicable
- databases: not applicable
- adminUi: not applicable
- headlessApi: not applicable
- templating: not applicable
- i18n: not applicable

### Rendering and deploy

- runsAs: unknown
- renderingModes: not applicable
- installMethod: npm, download, CDN

### License

- licenseModel: open-source
- license: MIT

### Releases

- currentMajor: 4
- latestReleaseDate: 2026-10-12

### Adoption

- githubStargazers: 1426
- packagistDownloads: not applicable
- npmWeeklyDownloads: 145483
- contributors: 59
- pluginCount: unknown
- packagistMonthlyDownloads: unknown
- ecosystemsMonthlyDownloads: unknown
- httpArchiveSites: unknown
- wordpressActiveInstalls: unknown
- dependentRepos: 3225
- dependentPackages: 1046

### Sources

- urls: https://raw.githubusercontent.com/testdouble/testdouble.js/main/README.md (read 2026-11-16)
- urls: https://api.github.com/repos/testdouble/testdouble.js (read 2026-11-16)
- maintainer: https://raw.githubusercontent.com/testdouble/testdouble.js/main/LICENSE.txt (read 2026-11-16)
- license: https://api.github.com/repos/testdouble/testdouble.js (read 2026-11-16)
- licenseModel: https://raw.githubusercontent.com/testdouble/testdouble.js/main/LICENSE.txt (read 2026-11-16)
- language: https://api.github.com/repos/testdouble/testdouble.js (read 2026-11-16)
- runtime: https://raw.githubusercontent.com/testdouble/testdouble.js/main/README.md (read 2026-11-16)
- runtimeMin: https://raw.githubusercontent.com/testdouble/testdouble.js/v4.0.0/package.json (read 2026-11-16)
- category: https://raw.githubusercontent.com/testdouble/testdouble.js/main/README.md (read 2026-11-16)
- installMethod: https://raw.githubusercontent.com/testdouble/testdouble.js/main/README.md (read 2026-11-16)
- installMethod: https://raw.githubusercontent.com/testdouble/testdouble.js/main/README.md (read 2026-11-16)
- installMethod: https://raw.githubusercontent.com/testdouble/testdouble.js/main/docs/1-installation.md (read 2026-11-17)
- npmWeeklyDownloads: https://api.npmjs.org/downloads/range/2026-11-01:2026-11-07/testdouble (read 2026-11-16)
- currentMajor: https://registry.npmjs.org/testdouble (read 2026-11-16)
- latestReleaseDate: https://registry.npmjs.org/testdouble (read 2026-11-16)
- firstRelease: https://registry.npmjs.org/testdouble (read 2026-11-16)
- githubStargazers: https://api.github.com/repos/testdouble/testdouble.js (read 2026-11-16)
- contributors: https://api.github.com/repos/testdouble/testdouble.js/contributors?per_page=1 (read 2026-11-16)
- dependentPackages: https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/testdouble (read 2026-11-16)
- dependentRepos: https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/testdouble (read 2026-11-16)

## Notes

testdouble.js is a test double library for JavaScript tests. It creates stand-ins for the dependencies a test replaces, stubs what they return and verifies how they were called. The [docs folder](https://github.com/testdouble/testdouble.js/tree/main/docs) covers the rest of the API, including the TypeScript usage.

The README links a comparison between testdouble.js and Sinon.js for readers who know Sinon.

## Worth knowing

The library is written for Node.js and browsers alike. It is test-framework agnostic, and the README names Jasmine, Mocha, Tape and Jest.

---

Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Attributes are recorded, never scored; absent means unknown.
Credit, in full: FindSoftware, CC BY 4.0
