1.1.0 • Published 7 years ago

jest-aliasify-resolver v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

jest-aliasify-resolver

This extension allows you to use aliasify transform with the Jest testing framework.

Installation

Install with npm install --save-dev jest-aliasify-resolver

Usage

After adding your aliases to either your package.json or to an aliasify config file, change the following field on your jest config file to

{
    ...
    "resolver": "jest-aliasify-resolver",
    ...
}

Or if you're using gulp-jest, don't forget to pass the resolver into the config object

...
return gulp.src(<path>).pipe(jest({
    config: {
        ...
        resolver: "jest-aliasify-resolver",
        ...
    }
}));
...

And voilá! Now your custom imports should resolve according to the aliases you have set up.