import { describe, expect, it } from "vitest"; import { isLocalSmokeFixtureConnection, localSmokeFixtureCommandPresets, localSmokeFixtureExpectedKeys, localSmokeFixtureProfileId, localSmokeFixtureSearchText, } from "./local-smoke-fixture"; describe("local smoke fixture helpers", () => { it("keeps the expected local smoke verification targets stable", () => { expect(localSmokeFixtureProfileId).toBe("redis-local-fixture"); expect(localSmokeFixtureSearchText).toBe("smoke:*"); expect(localSmokeFixtureExpectedKeys).toEqual([ "smoke:string", "smoke:string:ttl", "smoke:hash", "smoke:list", "smoke:set", "smoke:zset", "smoke:stream", ]); }); it("detects the built-in local fixture profile by id or target", () => { expect( isLocalSmokeFixtureConnection({ id: "redis-local-fixture", target: { host: "10.0.0.1", port: 6379, database: 2 }, }), ).toBe(true); expect( isLocalSmokeFixtureConnection({ id: "custom-profile", target: { host: "127.0.0.1", port: 6380, database: 0 }, }), ).toBe(true); expect( isLocalSmokeFixtureConnection({ id: "redis-local-fixture", target: { host: "127.0.0.1", port: 6380, database: 1 }, }), ).toBe(true); }); it("keeps fixture quick commands on a safe read-only path", () => { expect(localSmokeFixtureCommandPresets.map((preset) => preset.command)).toEqual([ "PING", "GET smoke:string", "TTL smoke:string:ttl", ]); }); });