ts-plugin / ts-plugin/ts-import-plugin

ts-jest integration

Open
#1,382 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
603
Forks
36
Avg merge
1m
Merged PRs (30d)
1

Description

Hello!

I was trying to set up ts-import-plugin as a ts-jest astTransformer. It looks like I configured it correctly, because import statements are replaced properly (I ran it in debug mode and I saw that createDistAst returns and array of new import nodes). But when I run the test, I see the error like this:

ReferenceError: lodash_1 is not defined

In the readme there is a lot of examples for different use cases. I was wondering if there is an example with ts-jest?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the README's existing use-case examples and the linked ts-jest astTransformers documentation. Reproduce the reported ReferenceError: lodash_1 is not defined with ts-import-plugin configured as a ts-jest transformer, then document a working ts-jest example in the README.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation, testing-qa
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.