Releases: japa/core
Improvements to hook methods
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
Full Changelog: v8.0.1...v8.0.2
Fix: Run test cleanup hooks in reverse order
Full Changelog: v8.0.0...v8.0.1
Major release under latest tag
Please refer the following pre-releases to learn more about the changes between the 7
and the 8
major release.
- https://github.com/japa/core/releases/tag/v8.0.0-0
- https://github.com/japa/core/releases/tag/v8.0.0-2
- https://github.com/japa/core/releases/tag/v8.0.0-3
- https://github.com/japa/core/releases/tag/v8.0.0-5
- https://github.com/japa/core/releases/tag/v8.0.0-6
- https://github.com/japa/core/releases/tag/v8.0.0-9
- https://github.com/japa/core/releases/tag/v8.0.0-10
Commits
Full Changelog: v7.3.3...v8.0.0
Use tsup for bundling
Full Changelog: v8.0.0-10...v8.0.0-11
Fix cleanup hooks from running multiple times when inside datasets
Add ability to reset test timeout from within the test callback
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
- refactor: remove optional modifier from test.context 79474e7
Full Changelog: v8.0.0-7...v8.0.0-8
Do not round test duration
Full Changelog: v8.0.0-6...v8.0.0-7
Add summary builder to allow multiple sources to contribute to the summary output
- feat: add summary builder for creating tests summary 1144da5
Full Changelog: v8.0.0-5...v8.0.0-6