1.0.0 • Published 2 years ago

@onerepo/plugin-jest v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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'],
};
1.0.0

2 years ago

1.0.0-beta.2

2 years ago

1.0.0-beta.1

2 years ago

1.0.0-beta.0

2 years ago

0.3.0

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.5

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.4

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago

0.0.0

3 years ago