@onerepo/plugin-jest v1.0.0
Jest is the recomended framework for headless testing with oneRepo. As opposed to Vitest and others, Jest allows a single runner that can use multiple project configurations. Think of each project as a separate workspace in your repo.
The added benefit of Jest is that as you are working, you can run this single command and it will automatically test appropriate files related to your changes across all workspaces. There's no need to determine which workspaces to run – and can all be done with --watch
mode at the same time.
Installation
npm install --save-dev @onerepo/plugin-jest
Add the plugin to your oneRepo bin file:
const { jest } = require('@onerepo/plugin-jest');
setup({
plugins: [
jest({
// ...options
}),
],
}).then(({ run }) => run());
Create a root level jest config with the appropriate references to your workspace Jest configs:
/** @type {import('jest').Config} */
export default {
projects: ['<rootDir>/apps/*/jest.config.js', '<rootDir>/modules/*/jest.config.js'],
};
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
6 months ago
6 months ago
6 months ago
6 months ago
10 months ago
10 months ago
8 months ago
7 months ago
6 months ago
6 months ago
6 months ago
9 months ago
10 months ago
6 months ago
8 months ago
6 months ago
6 months ago
7 months ago
8 months ago
9 months ago
10 months ago
10 months ago
6 months ago
10 months ago
6 months ago
10 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago