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