MCPcopy
hub / github.com/kulshekhar/ts-jest

github.com/kulshekhar/ts-jest @v29.4.11 sqlite

repository ↗ · DeepWiki ↗ · release v29.4.11 ↗
272 symbols 842 edges 220 files 18 documented · 7%
README

ts-jest

A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript.

NPM version NPM downloads Known vulnerabilities Coverage status GitHub actions GitHub license Gurubase

It supports all features of TypeScript including type-checking. Read more about Babel7 + preset-typescript vs TypeScript (and ts-jest).


We are not doing semantic versioning and 23.10 is a re-write, run npm i -D ts-jest@"<23.10.0" to go back to the previous version

View the online documentation (usage & technical)

Ask for some help in the Jest Discord community or ts-jest GitHub Discussion

Before reporting any issues, be sure to check the troubleshooting page

We're looking for collaborators! Want to help improve ts-jest?


Getting Started

These instructions will get you setup to use ts-jest in your project. For more detailed documentation, please check online documentation.

using npm using yarn
Prerequisites npm i -D jest typescript yarn add --dev jest typescript
Installing npm i -D ts-jest @types/jest yarn add --dev ts-jest @types/jest
Creating config npx ts-jest config:init yarn ts-jest config:init
Running tests npm test or npx jest yarn test or yarn jest

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We DO NOT use SemVer for versioning. Though you can think about SemVer when reading our version, except our major number follows the one of Jest. For the versions available, see the tags on this repository.

Authors/maintainers

See also the list of contributors who participated in this project.

Supporters

  • JetBrains has been kind enough to support ts-jest with a [license for open source] (https://www.jetbrains.com/community/opensource/?from=ts-jest).

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Extension points exported contracts — how you extend this code

CompilerInstance (Interface)
(no doc) [3 implementers]
src/types.ts
RawCompilerOptions (Interface)
(no doc)
src/raw-compiler-options.ts
ImportOptions (Interface)
(no doc)
src/utils/importer.ts
CachedConfigSet (Interface)
(no doc)
src/legacy/ts-jest-transformer.ts
TsJestPresetDescriptor (Interface)
(no doc)
src/cli/helpers/presets.ts
MockWriteStream (Interface)
(no doc)
src/__helpers__/mocks.ts
TsCompilerInstance (Interface)
(no doc) [1 implementers]
src/types.ts
RequireResult (Interface)
(no doc)
src/utils/importer.ts

Core symbols most depended-on inside this repo

createConfigSet
called by 69
src/__helpers__/fakers.ts
getCompiledOutput
called by 24
src/types.ts
interpolate
called by 22
src/utils/messages.ts
getCacheKey
called by 22
src/legacy/ts-jest-transformer.ts
toString
called by 21
src/utils/jsonable-value.ts
makeCompiler
called by 21
src/__helpers__/fakers.ts
clear
called by 21
src/__helpers__/mocks.ts
raiseDiagnostics
called by 16
src/legacy/config/config-set.ts

Shape

Function 148
Method 73
Interface 24
Class 20
Enum 7

Languages

TypeScript100%

Modules by API surface

src/legacy/config/config-set.ts21 symbols
src/types.ts20 symbols
src/legacy/compiler/ts-compiler.ts19 symbols
src/utils/importer.ts16 symbols
src/legacy/ts-jest-transformer.ts16 symbols
src/presets/create-jest-preset.ts13 symbols
src/presets/all-presets.ts12 symbols
src/cli/helpers/presets.ts10 symbols
src/transformers/hoist-jest.ts9 symbols
src/__helpers__/mocks.ts9 symbols
src/utils/memoize.spec.ts7 symbols
src/utils/jsonable-value.ts7 symbols

Dependencies from manifests, versioned

@akebifiky/remark-simple-plantuml1.0.2 · 1×
@babel/core7.29.0 · 1×
@babel/preset-env7.29.5 · 1×
@commitlint/cli19.8.1 · 1×
@commitlint/config-angular19.8.1 · 1×
@docusaurus/core3.10.1 · 1×
@docusaurus/faster3.10.1 · 1×
@docusaurus/module-type-aliases3.10.1 · 1×
@docusaurus/plugin-ideal-image3.10.1 · 1×
@docusaurus/plugin-pwa3.10.1 · 1×
@docusaurus/preset-classic3.10.1 · 1×
@docusaurus/remark-plugin-npm2yarn3.10.1 · 1×

For agents

$ claude mcp add ts-jest \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact