Skip to content

Releases: japa/core

Improvements to hook methods

18 Oct 12:32
Compare
Choose a tag to compare

The hook methods like suite.onGroup, suite.onTest, group.tap, and runner.onSuite used to execute for newly added instances to the respective classes. After this release, the hooks will be executed for pre-registered instances as well.

const test = new Test(...args)
const test1 = new Test(...args)

const group = new Group(...args)

/**
 * The follow tap method will not be called for this
 * test
 */
group.add(test)

group.tap((t) => {
})

/**
 * The above tap method will be called for the following
 */
group.add(test)

After this change, the tap method will run for all the tests registered with a group, regardless of when they are added. Same applies for other hooks as well

Commits

  • chore: configure c8 2a83807
  • chore: update dependencies d89d6d6
  • feat: improvements to onGroup, onTest, tap, and onSuite hooks 7791d2a

Full Changelog: v8.0.2...v8.1.0

Update dependencies

14 Oct 07:16
Compare
Choose a tag to compare
  • chore: add missing dependency 9ddc069
  • chore: update dependencies 4c0e0b4

Full Changelog: v8.0.1...v8.0.2

Fix: Run test cleanup hooks in reverse order

09 Oct 07:54
Compare
Choose a tag to compare
  • fix: run test cleanup hooks in reverse order 7463b4a
  • chore: update dependencies 24f5862

Full Changelog: v8.0.0...v8.0.1

Major release under latest tag

Use tsup for bundling

23 Sep 12:43
Compare
Choose a tag to compare
Use tsup for bundling Pre-release
Pre-release

Full Changelog: v8.0.0-10...v8.0.0-11

Fix cleanup hooks from running multiple times when inside datasets

15 Sep 07:02
Compare
Choose a tag to compare
  • chore: pin swc/core as the latest release breaks 2e39c1a
  • chore: update dependencies 8bb3b3b
  • fix: remove cleanup hooks after they have been executed a74732f

v8.0.0-9...v8.0.0-10

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