molecule-core/mcp-server/jest.config.cjs
Hongming Wang 24fec62d7f initial commit — Molecule AI platform
Forked clean from public hackathon repo (Starfire-AgentTeam, BSL 1.1)
with full rebrand to Molecule AI under github.com/Molecule-AI/molecule-monorepo.

Brand: Starfire → Molecule AI.
Slug: starfire / agent-molecule → molecule.
Env vars: STARFIRE_* → MOLECULE_*.
Go module: github.com/agent-molecule/platform → github.com/Molecule-AI/molecule-monorepo/platform.
Python packages: starfire_plugin → molecule_plugin, starfire_agent → molecule_agent.
DB: agentmolecule → molecule.

History truncated; see public repo for prior commits and contributor
attribution. Verified green: go test -race ./... (platform), pytest
(workspace-template 1129 + sdk 132), vitest (canvas 352), build (mcp).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 11:55:37 -07:00

32 lines
940 B
JavaScript

/** @type {import('jest').Config} */
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
testMatch: ["**/__tests__/**/*.test.ts"],
moduleNameMapper: {
// Strip .js extensions from imports so ts-jest can resolve .ts files
"^(\\.{1,2}/.*)\\.js$": "$1",
// Map ESM-only MCP SDK imports to their CJS equivalents
"^@modelcontextprotocol/sdk/server/mcp\\.js$":
"<rootDir>/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js",
"^@modelcontextprotocol/sdk/server/stdio\\.js$":
"<rootDir>/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.js",
},
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
tsconfig: {
module: "CommonJS",
moduleResolution: "node",
esModuleInterop: true,
strict: true,
target: "ES2022",
isolatedModules: true,
},
diagnostics: false,
},
],
},
};