iovalkey
Node.js · iovalkey 0.4.0 · RESP2
Listed tests passed
Tested connection settings
protocol: 2; disconnect()
Test target: 127.0.0.1:6379, username default, fixture password manual-test-only, default database. This password is only for the disposable local test container.
Verified operations
- authenticated PING
- SET
- Unicode GET
- missing GET
- HSET (raw API)
- HGET (raw API)
- LRANGE (raw API)
- MULTI/EXEC
- concurrent requests
- Lua EVAL (raw API)
- PX/PTTL (raw API)
Coverage is limited to the exact API calls and assertions in the program below.
Executable test example
This program ran inside the isolated Docker image. It contains multiple client branches; this page uses the arguments below. Dependencies and compilation steps are in the test directory's Dockerfile.
node "/clients/node-client.mjs" iovalkey 2View the complete executed source
// Run: node node-client.mjs redis|ioredis|iovalkey|glide [2|3]. Fixture only.
import assert from "node:assert/strict";
import fs from "node:fs";
import { createRequire } from "node:module";
const require = createRequire(import.meta.url);
const library = process.argv[2];
const protocol = Number(process.argv[3] ?? 2);
const checks = [];
const check = (name, actual, expected) => { assert.deepEqual(actual, expected, name); checks.push(name); process.stderr.write(`${library}: ${name} passed\n`); };
let packageName = library;
if (library === "glide") {
packageName = "@valkey/valkey-glide";
const { GlideClient, ProtocolVersion } = await import(packageName);
const client = await GlideClient.createClient({ addresses: [{ host: "127.0.0.1", port: 6379 }],
credentials: { username: "default", password: "manual-test-only" }, protocol: ProtocolVersion.RESP3, requestTimeout: 5000 });
try {
check("authenticated PING", await client.ping(), "PONG");
check("SET", await client.set("node-glide:text", "Hello 世界"), "OK");
check("Unicode GET", await client.get("node-glide:text"), "Hello 世界");
check("missing GET", await client.get("node-glide:missing"), null);
await client.hset("node-glide:hash", { field: "value" });
check("HGET", await client.hget("node-glide:hash", "field"), "value");
check("Lua EVAL (raw API)", await client.customCommand(["EVAL", "return redis.call('GET',KEYS[1])", "1", "node-glide:text"]), "Hello 世界");
} finally { client.close(); }
} else {
let client, call, close;
if (library === "redis") {
const { createClient } = await import("redis");
client = createClient({ RESP: protocol, username: "default", password: "manual-test-only",
socket: { host: "127.0.0.1", port: 6379, connectTimeout: 5000, reconnectStrategy: false } });
client.on("error", (error) => process.stderr.write(error.message + "\n"));
await client.connect();
call = (args) => client.sendCommand(args);
close = () => client.close();
} else {
const Client = (await import(library)).default;
client = new Client({ host: "127.0.0.1", port: 6379, username: "default", password: "manual-test-only", protocol,
connectTimeout: 5000, commandTimeout: 5000, maxRetriesPerRequest: 0, retryStrategy: () => null });
call = (args) => client.call(...args);
close = () => process.argv.includes("--quit-probe") ? client.quit() : client.disconnect();
}
try {
check("authenticated PING", await client.ping(), "PONG");
await call(["DEL", "node:hash", "node:list"]);
check("SET", await client.set("node:text", "Hello 世界"), "OK");
check("Unicode GET", await client.get("node:text"), "Hello 世界");
check("missing GET", await client.get("node:missing"), null);
check("HSET (raw API)", await call(["HSET", "node:hash", "field", "value"]), 1);
check("HGET (raw API)", await call(["HGET", "node:hash", "field"]), "value");
await call(["RPUSH", "node:list", "a", "b"]);
check("LRANGE (raw API)", await call(["LRANGE", "node:list", "0", "-1"]), ["a", "b"]);
const transaction = client.multi().set("node:counter", "1").incr("node:counter").get("node:counter");
check("MULTI/EXEC", await transaction.exec(), library === "redis" ? ["OK", 2, "2"] : [[null, "OK"], [null, 2], [null, "2"]]);
const values = await Promise.all([client.get("node:text"), client.get("node:counter")]);
check("concurrent requests", values, ["Hello 世界", "2"]);
check("Lua EVAL (raw API)", await call(["EVAL", "return redis.call('GET',KEYS[1])", "1", "node:counter"]), "2");
await call(["SET", "node:expiry", "value", "PX", "60000"]);
const ttl = await call(["PTTL", "node:expiry"]);
check("PX/PTTL (raw API)", ttl > 0 && ttl <= 60000, true);
} finally { await close(); process.stderr.write(`${library}: cleanup completed\n`); }
}
// Read the exact installed package, not a guessed range.
const version = JSON.parse(fs.readFileSync(`/clients/node_modules/${packageName}/package.json`, "utf8")).version;
console.log(JSON.stringify({ library: packageName, version, protocol: library === "glide" ? 3 : protocol, checks, status: "passed" }));
Official client repository · Dependencies and reproduction
Test environment & reproducible evidence
Verified: 2026-09-21T11:15:27Z · Docker / Linux aarch64 · lavik 0.1.0-beta.1
Storage & connection: io_uring · temporary file, 2 workers, standalone, plaintext TCP, password authentication. This test does not measure NVMe performance.
Pinned source: 3955b98d43b312324aa8d52775df52cfb111c0d0
Binary SHA-256: 8306b37ddf05023f85166a6aa2192b7084757e8defd342b602e6470244aca887
Image: sha256:fd13690a1931b8abb31b1866baa2a08c7c38e6df93aa78883321d1d3c1cddd00