Registry / testing / wadis
library1.0.2jsnpmunverified

Wadis is a WebAssembly build of the Redis in-memory datastore, purpose-built for automated testing. It provides a high-fidelity, ephemeral Redis server that runs in-process with your tests, eliminating the need for Docker or external binaries. Version 1.0.2 is the latest stable release, with active development; it ships TypeScript types and supports Node.js >=20 and Bun >=1.1. Key differentiators include instant boot (milliseconds), zero state collision between instances, and support for advanced Redis features like Pub/Sub and Lua scripting. It offers an ioredis-compatible client API and a low-level server API for raw RESP access.

npm install wadis
INSTALL
IMPORT
SIG · WADIS
W
wadis
testingjavascriptv1.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Wadis
✓ import { Wadis } from 'wadis'
✗ import Wadis from 'wadis'
Named export, not default. Also works with require: const { Wadis } = require('wadis')
WadisServer
✓ import { WadisServer } from 'wadis'
✗ import { WadisServer } from 'wadis/server'
Exported from the main package, not a subpath
require('wadis')
✓ const { Wadis } = require('wadis')
✗ const wadis = require('wadis')
CommonJS users must destructure; default export is undefined.

Shows basic setup: install, create an isolated Redis instance, run commands, and clean up.

npm install -D wadis import { Wadis } from 'wadis'; const redis = new Wadis(); await redis.set('foo', 'bar'); console.log(await redis.get('foo')); // 'bar' await redis.incr('counter'); const counter = await redis.get('counter'); console.log(counter); // '1' await redis.quit();
Debug
Known issues
breakingNode.js version must be >=20.0.0 or Bun >=1.1.0
fix
Upgrade to Node.js 20+ or use Bun 1.1+
affects: >=1.0.0
gotchaWadis instances are ephemeral; data is lost when the instance is terminated or process exits
fix
Do not use for production persistence; intended only for testing
affects: >=1.0.0
gotchaThe low-level server API returns raw RESP as Uint8Array; you must decode manually
fix
Use new TextDecoder().decode(reply) to get the RESP string
affects: >=1.0.0
deprecatedThe 'loglevel' option in WadisServer.new() uses deprecated Redis log level names like 'notice'
fix
Use standard Redis log levels: 'debug', 'verbose', 'notice', 'warning' (still supported but may change)
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'wadis' or its corresponding type declarations.
Package not installed, or missing ioredis peer dependency
fix
Run `npm install -D wadis ioredis`
TypeError: wadis_1.default is not a constructor
Using default import instead of named import
fix
Use `import { Wadis } from 'wadis'` instead of `import Wadis from 'wadis'`
Error: wadis: failed to load wasm module
Node.js version <20, or missing WebAssembly support
fix
Upgrade Node.js to >=20.0.0
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies
ioredisrequiredPeer dependency; Wadis extends the ioredis client for its high-level API
Agent activity
26 hits · last 30 days
node
22
OpenAI (training)
1
Resources
packagewadis ↗
wadis — npm install wadis · libregistry