You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
veeramarni edited this page Jun 14, 2019
·
5 revisions
Jest config file exists in the root
moduleNameMapper helps to map modules if a package in the test case referring to the same module.
For example, if we have
// packageB/sample.test.ts
import { something } from 'packageA';
If packageA has a packageB dependency, then jest will invoke packageB/lib/index.js. If we need to map to packageB/src/index.ts we can do using moduleNameMapper.