Releases: japa/runner
Test macros, support for bail mode and some breaking changes
4.0.0 (2025-01-06)
Test macros
Test macros are reusable test bound functions that can create and destroy resources around the lifecycle of a test. You can learn more about them in the docs and this tweet. https://x.com/AmanVirk1/status/1876135855074488589
Bail mode
In bail mode, all the upcoming tests after the failing test will be skipped. You could enable the bail mode in CI/CD pipelines to early exit the workflow after having a failing test. The bail mode is enabled using the --bail
flag.
Changes to styling of subtext
The subtext
refers to the text displayed by the spec
reporter for the skipped
and the regression
tests. Earlier, the subtext was displayed in the same color as the test title. Now it is displayed as dimmed text with small tweaks to the styling. Please refer the following screenshots for the same.
Before
After
Bug Fixes
- remove failed CLI flag from the string array (31e38ca)
Code Refactoring
- rename createDiverseTests to createDummyTests (07ea6bc)
Features
- add support for bail mode (cf64cf9)
- add test.macro to define test bound reusable functions (83ff323)
- change styling of subtext (663dcbe)
- point timeout and regression errors to the test callback (d0462fb)
- serialize suite errors in ndjson reporter (5a8a9f9)
BREAKING CHANGES
- Rename
createDiverseTest
tocreateDummyTests
exported via@japa/runner/factories
Full Changelog: v3.1.4...v4.0.0
Detect colors support before using ansi colors
- fix: remove hardcoded uses of colors.ansi with internal helper 56e5918
Full Changelog: v3.1.3...v3.1.4
Respect color support before using ansi colors
- fix: respect color support before using ansi colors b7be1a5
Full Changelog: v3.1.2...v3.1.3
Update dependencies
- chore: update dependencies bceba2f
Full Changelog: v3.1.1...v3.1.2
Update dependencies
- chore: update dependencies dad177d
Full Changelog: v3.1.0...v3.1.1
Add option to exclude certain directories when scanning for test files
The new config option exclude
is used to define a list of glob patterns to use to ignore when scanning tests files.
{
files: '**/*.spec.js',
exclude: [
'node_modules/**',
'bower_components/**',
'jspm_packages/**'
]
}
Commits
- test: fix breaking tests f1cf114
- refactor: ignore certain directories by default 064b544
- feat: add option to exclude files from the tests glob dad63db
- refactor: do not split --tests filter by comma a9f9d55
- chore: update dependencies 0e618da
- chore: update dependencies 7341ad1
Full Changelog: v3.0.5...v3.1.0
Use tsup for bundling
Full Changelog: v3.0.4...v3.0.5
Fix the retry plugin to use teardown hook
- fix: use teardown hook to get failed tests 27186a6
- fix: use teardown hook to get failed tests 536a076
Full Changelog: v3.0.3...v3.0.4
Fix issues with the sync reporter
Full Changelog: v3.0.2...v3.0.3
Bug fix in retry failed tests plugin
- fix(retryPlugin): handle exceptions and run tests as normal 267daaf
- chore: update dependencies 31b5051
Full Changelog: v3.0.1...v3.0.2