v0.3.0
Highlights π‘
Incremental re-runs in watch mode
Watch mode now supports incremental re-runs. When a test file or its dependencies change, Rstest intelligently re-executes only the affected tests, significantly improving testing efficiency.
Test projects
Support define & run multiple test projects via projects configuration. This allows users to define and run tests across multiple project directories with different configurations, enabling better organization of test suites in monorepo structures.
import { defineConfig } from '@rstest/core';
export default defineConfig({
projects: [
// A monorepo: each package directory is a project
'packages/*',
// All apps that provide an rstest config file
'apps/**/rstest.config.ts',
// A specific project directory
'<rootDir>/services/auth',
// A specific project's config file
'./projects/web/rstest.config.ts',
],
});What's Changed
New Features π
Bug Fixes π
- fix: add
onTestFinishedto testContext by @9aoy in #494 - fix: use clearScreen instead of clearLogs by @9aoy in #504
- fix: manualMockRoot in projects by @9aoy in #508
- fix: compat NO_COLOR env by @9aoy in #509
- fix: should avoid outputs conflict in projects by @9aoy in #515
- fix: should not expand diff by default by @9aoy in #516
Document π
Other Changes
- chore: should not clearLogs in debug mode by @9aoy in #496
- chore(deps): update all non-major dependencies by @renovate[bot] in #497
- test: avoid repeated killing of exec by @9aoy in #498
- test: fix unstable concurrent cases with onTestFinished by @9aoy in #499
- test: fix unawaited promise in tests by @9aoy in #503
- chore: use
isFirstCompileinstead ofisFirstRunby @9aoy in #506 - chore: update react example with
@testing-library/jest-domby @9aoy in #510 - chore(deps): update all non-major dependencies by @renovate[bot] in #511
- chore: update no rerun log by @9aoy in #513
Full Changelog: v0.2.2...v0.3.0