In Jest/Vitest every test starts fresh, so multi-step workflows (create user → read user → delete user) need mocks or duplicated setup. In FennecKit, tests inside one Lab run in order and share data.
import { newLabs } from "fenneckit";
await newLabs("User API", async (kit) => {
await kit.test("Create User", async () => {
const res = await kit.http.post("https://api.example.com/users", {
name: "John",
});
kit.setStore("userId", res.data.id);
kit.done("User created");
});
await kit.test("Get User", async () => {
const res = await kit.http.get(
`https://api.example.com/users/${kit.getStore("userId")}`,
);
kit.done(`Status ${res.status}`);
});
});npm install fenneckit@latest --save-devRequires Node.js >= 20.
npx fenneckit # auto-discover and run all *.labs.js files
npx fenneckit user.labs.js # run one file- Lab: a group of sequential tests working toward one goal.
- Test: one step inside a lab, run with
kit.test(name, fn). - Storage: data shared between tests of the same lab (see below).
| Feature | What it does | Docs |
|---|---|---|
| 🔬 Labs | Group tests into workflows | Getting started |
| 📦 STORE | Plain shared data | Storage |
| 🔐 SECRET | AES-256-GCM encrypted data | Storage |
| 🗂️ NAMESPACE | Grouped data per entity | Storage |
| ⏱️ TEMP | Lab-local scratch data | Storage |
| ⏰ TTL | Auto-expiring STORE/SECRET values | Storage |
| 📡 HTTP Kit | Client with auth, retry, history | HTTP Kit |
| 📋 Audit Log | Trace store/secret access, export JSON/CSV | Audit log |
- Getting started
- Storage (STORE, SECRET, NAMESPACE, TEMP, TTL)
- HTTP Kit
- Audit log
- API reference
- Best practices
- Changelog
MIT. Copyright © 2026 Lasith Ruwantha Amrwansha.
