Skip to content

Example of how to use Jest project runner with individual babelrc config

License

Notifications You must be signed in to change notification settings

ofhouse/jest-project-babel-transformer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jest multi project runner with babel-jest Build status

This is an example of how to use the babel-jest transformer in a monorepo where each package uses its own .babelrc.js configuration-file. This is especially useful when the projects in your workspace do not share the same babel-preset or plugins but you still want to use the multi runner to run all test in your monorepo.

Structure

The structure of this repository is as follows:

fixtures/
├── angular-js/        # Workspace 1
│   ├── .babelrc.js
│   ├── jest.config.js
│   └── package.json
└── react/             # Workspace 2
    ├── .babelrc.js
    ├── jest.config.js
    └── package.json
jest.config.js         # Workspace root
package.json

The tests can be run from the workspace root, which uses the jest projects config or individually from each package which uses the local jest config from each project.

Setup & Test

# Install dependencies
yarn

# Run all tests from workspace root
yarn test

# Run tests in a workspace
cd fixtures/react
yarn test

Author


Felix Haus

WebsiteTwitter

License

MIT - see LICENSE for details.

About

Example of how to use Jest project runner with individual babelrc config

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published