entwicklerstube/babel-plugin-root-import

Not working with Jest

denghejun opened this issue · 7 comments

in some test file:

import ModuleProvider from '~/module.config'

get errors below:

Cannot find module '~/module.config' from 'app-bootstrapper.ts'

I have try to run jest with params --no-cache, still get the same error.

+1 Not working with mocha

@shikelong please create a new issue with the error and steps to reproduce.

Closing this because it's old, and I've used this plugin with jest.

@brigand what do you have to do to get it working with jest?

@Aequitas737 sorry for the late reply.

Aside from installing babel-jest, I don't think I do anything special. If you're having an issue, please explain in more detail (and error messages would help).

This do not work with jest. All files we import using root-import are not recognized by jest.

@witalobenicio could you open a new issue with your babel config (specifying which file it's in) and package.json, along with the error you get?

Yep @brigand . I've opened. Thanks.