Skip to content

Releases: japa/runner

Test macros, support for bail mode and some breaking changes

06 Jan 05:27
Compare
Choose a tag to compare

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

japa-3-x

After

japa-4-x

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 to createDummyTests exported via @japa/runner/factories

Full Changelog: v3.1.4...v4.0.0

Detect colors support before using ansi colors

16 Apr 08:08
Compare
Choose a tag to compare
  • fix: remove hardcoded uses of colors.ansi with internal helper 56e5918

v3.1.3...v3.1.4

Full Changelog: v3.1.3...v3.1.4

Respect color support before using ansi colors

16 Apr 08:00
Compare
Choose a tag to compare
  • fix: respect color support before using ansi colors b7be1a5

Full Changelog: v3.1.2...v3.1.3

Update dependencies

29 Mar 09:47
Compare
Choose a tag to compare
  • chore: update dependencies bceba2f

Full Changelog: v3.1.1...v3.1.2

Update dependencies

16 Dec 06:05
Compare
Choose a tag to compare
  • chore: update dependencies dad177d

Full Changelog: v3.1.0...v3.1.1

Add option to exclude certain directories when scanning for test files

22 Nov 04:54
Compare
Choose a tag to compare

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

06 Nov 08:48
Compare
Choose a tag to compare
  • chore: use tsup for bundling 36cfd87
  • chore: update dependencies 36feaa7

Full Changelog: v3.0.4...v3.0.5

Fix the retry plugin to use teardown hook

19 Oct 05:16
Compare
Choose a tag to compare
  • fix: use teardown hook to get failed tests 27186a6
  • fix: use teardown hook to get failed tests 536a076

v3.0.3...v3.0.4

Full Changelog: v3.0.3...v3.0.4

Fix issues with the sync reporter

18 Oct 12:37
Compare
Choose a tag to compare
  • chore: update dependencies a7317d0
  • fix: sync reporter to throw suite errors 7d57c81

Full Changelog: v3.0.2...v3.0.3

Bug fix in retry failed tests plugin

16 Oct 05:54
Compare
Choose a tag to compare
  • fix(retryPlugin): handle exceptions and run tests as normal 267daaf
  • chore: update dependencies 31b5051

Full Changelog: v3.0.1...v3.0.2