Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to add a real module as a dependency for the code under test? #17

Open
DevPrice opened this issue Jul 9, 2022 · 0 comments

Comments

@DevPrice
Copy link

DevPrice commented Jul 9, 2022

That is, when I'm trying to test a transfomer:

transform("import * as SomeModule from \"some-module\"\n\nSomething.doThing()", options)
index.ts:1:29 - error TS2307: Cannot find module 'some-module'.

How do I bring the "some-module" dependency here for testing? I see that I can bring in mock dependencies; do I need to manully "mock" it using the real source?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant