
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
@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 4 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.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.