Skip to content

Releases: japa/core

Add ability to reset test timeout from within the test callback

08 Jul 05:57
Compare
Choose a tag to compare

You can call the resetTimeout method within the test callback to reset the test timeout.

test('title', ({  test: self }) => {
  self.resetTimeout()
})

We might add a helper within the test context to destructure the resetTimeout method directly

Commits

  • feat: add ability to resetTimeout within the test callback 433ede5
  • refactor: test timeout timer logic 10fdb34
  • chore: update dependencies 9f28876

Full Changelog: v8.0.0-8...v8.0.0-9

Remove optional modifier from test.context

03 Jul 07:17
Compare
Choose a tag to compare
  • refactor: remove optional modifier from test.context 79474e7

Full Changelog: v8.0.0-7...v8.0.0-8

Do not round test duration

29 Jun 05:50
Compare
Choose a tag to compare
Pre-release
  • fix: do not round test duration af1c1b6
  • chore: update dependencies 3863e55

Full Changelog: v8.0.0-6...v8.0.0-7

Add summary builder to allow multiple sources to contribute to the summary output

27 Jun 07:59
Compare
Choose a tag to compare
  • feat: add summary builder for creating tests summary 1144da5

Full Changelog: v8.0.0-5...v8.0.0-6

Changes to negated tags and unhandled errors

27 Jun 04:49
Compare
Choose a tag to compare

We have removed all the code related to unhandled errors. There is no simple and correct way to find which test caused an unhandled exception or rejection. Therefore, we will monitor these errors globally and report them with pretty printed stack trace. The stack trace might help you find the related test.

Now, you can prefix your tags with tilde ~ and it will be considered as a negated tag. Earlier, the character was !, but you will have to escape ! inside a terminal, whereas ~ needs no escaping.

Hope, everything makes sense :)

Commits

  • feat: allow negated tags using the ~ character f1ba19a
  • refactor: remove code related to unhandleExceptions f4fe87f
  • chore: update dependencies e266ae5

Full Changelog: v8.0.0-4...v8.0.0-5

Follow up on last release. Removing references to uncaught exception event

26 Jun 05:10
Compare
Choose a tag to compare
  • refactor: remove unused aggregate for uncaughtExceptions 5ebf3d0

Full Changelog: v8.0.0-3...v8.0.0-4

Remove uncaught:exception event

24 Jun 15:41
Compare
Choose a tag to compare
Pre-release

We will use the uncaughtException process event directly, instead of abstracting it away.

Breaking change

  • The uncaught:exception event does not exists anymore.
  • Removed runner.managerUncaughtExceptions() method.

Commits

  • refactor: remove uncaught:exception event 1c50571

Full Changelog: v8.0.0-2...v8.0.0-3

Add static executing and executed callbacks

24 Jun 11:33
Compare
Choose a tag to compare

You can define executing and executed callbacks as static properties on a Test class. These callbacks are executed right before and after the test callback function.

  • The callbacks have to be synchronous.
  • The will be executed for all the tests created using Test class.
  • They can make a test fail by throwing an exception.

Breaking change

  • The Test.dispose method has been replaced with Test.executed

Commits

  • test: fix breaking tests dc969b5
  • test: fix breaking tests d519b3e
  • feat: add executing and executed static hooks and remove dispose callbacks 6711174
  • chore: update dependencies 088f407
  • ci: refactor workflows files 10f7949

Full Changelog: v8.0.0-1...v8.0.0-2

Remove types exported from the main entrypoint

22 Jun 10:56
Compare
Choose a tag to compare

The types can be imported using the @japa/core/types import path

Commits

  • refactor: do not export types from main module 688ad46

Full Changelog: v8.0.0-0...v8.0.0-1

Preparing for Japa@3

22 Jun 10:27
Compare
Choose a tag to compare
Preparing for Japa@3 Pre-release
Pre-release

Breaking changes

  • The package is ESM only
  • The hooks types does not allow returning values except a cleanup function or void. Early any was allowed. This does not have any impact on the runtime behavior, the change only effects the TypeScript types.

Commits

  • chore: add engines to package.json file 7cd0dd3
  • feat: add support for matching all the tags 37295f5
  • refactor: rename internal property for storing negated tags e6636a6
  • ci: finding a way to run tests on windows c6b8659
  • test: add a bin script to self execute tests 4e93bf2
  • chore: add typechecking script a94e0bd
  • ci: fix path to shared workflow files 29dab6c
  • ci: add workflows for lint and typecheck 6b851a5
  • refactor: migrate to esm and use node:test for testing 54e564f
  • chore: upgrade packages and tooling config e0634fc
  • chore: update dependencies c2812a0
  • docs: update License file 1471e58
  • chore: update dependencies 2c8b7bf

Full Changelog: v7.3.3...v8.0.0-0