
Security News
Insecure Agents Podcast: How to Keep AI Agents From Bypassing Security Controls
Socket CTO Ahmad Nassri discusses how to keep AI agents from bypassing package blocks, limit credential access, and monitor their actions.
@memofs/testing
Advanced tools
@memofs/testingShared contract tests, fixtures, fakes, and assertion helpers for MemoFS packages.
Shared contract tests, fixtures, fakes, and assertion helpers for MemoFS packages. Adapter authors depend on this package to run the contract suites shipped from core against their own implementations of the embedder, reranker, recall store, memory store, extractor, LLM client, blob client, and metadata store contracts.
npm install -D @memofs/testing vitest
vitest is a peer dependency.
Requires Node.js >= 22.
vitest is a peer dependency. Adapter authors should also install @memofs/core for the Minimal* types used in the contract options.
// packages/my-adapter/src/embedder/my-embedder.test.ts
import { describe } from "vitest";
import { defineEmbedderContractTests } from "@memofs/testing/contracts";
import { createMyEmbedder } from "./my-embedder";
describe("My Embedder Contract", () => {
defineEmbedderContractTests(() => createMyEmbedder({ apiKey: "test" }));
});
| Subpath | Contents |
|---|---|
@memofs/testing | Assertion helpers: expectVector, expectSortedDescending, expectFiniteNumber, expectNoMutation, cloneForMutationCheck |
@memofs/testing/contracts | defineEmbedderContractTests, defineRerankerContractTests, defineRecallStoreContractTests, defineMemoryStoreContractTests, defineExtractorContractTests, defineLlmClientContractTests, defineBlobClientContractTests, defineMetadataStoreContractTests, and the *ContractOptions types |
@memofs/testing/fakes | createFakeEmbedder, createFakeReranker, createFakeRecallStore, createFakeMemoryStore and their class types |
@memofs/testing/fixtures | embeddingFixtures, rerankFixtures, recallFixtures, memoryFixtures, consolidationFixtures |
@memofs/testing/vitest | createVitestConfig(overrides?) — a base vitest config factory |
For the full contract surface, the options each contract accepts, and the fakes' option shapes, please refer to the Full Documentation.
See our central Contributing Guide and development scripts for details on formatting, linting, and testing within the monorepo.
MIT
FAQs
Shared contract tests, fixtures, and fakes for MemoFS packages.
The npm package @memofs/testing receives a total of 18 weekly downloads. As such, @memofs/testing popularity was classified as not popular.
We found that @memofs/testing demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Socket CTO Ahmad Nassri discusses how to keep AI agents from bypassing package blocks, limit credential access, and monitor their actions.

Security News
GPT-6 Astra tried to plant malicious code in simulated open source projects using fake GitHub accounts and deceptive PRs during an assigned CTF challenge.

Security News
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.