Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR transitions tests from using tap to the Node.js built-in test module and updates assertions to leverage the newer API promises style. Key changes include the introduction of a helper “sequence” function to manage asynchronous test flows, the replacement of tap assertions (e.g. t.error, t.equal) with their node:test equivalents (e.g. t.assert.ifError, t.assert.strictEqual, t.assert.deepStrictEqual), and modifications in schema-related tests to support the API promises migration.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/toolkit.js | Introduced a new helper function (sequence) for test flow control. |
| test/schema-special-usage.test.js | Updated test assertions and test callback signatures for improved async handling. |
| test/schema-serialization.test.js | Replaced tap assertions with modern Node.js test module assertions and integrated the sequence helper. |
dbec825 to
a4b7255
Compare
Co-authored-by: Manuel Spigolon <[email protected]> Signed-off-by: Jean <[email protected]>
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [fastify](https://fastify.dev/) ([source](https://github.com/fastify/fastify)) | [`5.3.3` -> `5.4.0`](https://renovatebot.com/diffs/npm/fastify/5.3.3/5.4.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>fastify/fastify (fastify)</summary> ### [`v5.4.0`](https://github.com/fastify/fastify/releases/tag/v5.4.0) [Compare Source](fastify/fastify@v5.3.3...v5.4.0) #### What's Changed - test: mv routes-\* from tap by [@​jean-michelet](https://github.com/jean-michelet) in fastify/fastify#6092 - test: mv skip-reply-send from tap by [@​jean-michelet](https://github.com/jean-michelet) in fastify/fastify#6094 - test: mv plugins from tap by [@​jean-michelet](https://github.com/jean-michelet) in fastify/fastify#6088 - fix(ci): ignore alternative runtime result by [@​Eomm](https://github.com/Eomm) in fastify/fastify#6125 - test: mv schema-\* from tap by [@​jean-michelet](https://github.com/jean-michelet) in fastify/fastify#6093 - test: mv hooks-async from tap by [@​jean-michelet](https://github.com/jean-michelet) in fastify/fastify#6084 - fix(types): add missing version to request.routeOptions by [@​inyourtime](https://github.com/inyourtime) in fastify/fastify#6126 - docs: remove fastify-sentry plugin by [@​dnlup](https://github.com/dnlup) in fastify/fastify#6131 - docs: add community plugins disclaimer by [@​jean-michelet](https://github.com/jean-michelet) in fastify/fastify#6132 - docs: use cross-platform compatible info emoji by [@​Fdawgs](https://github.com/Fdawgs) in fastify/fastify#6134 - perf: nits in reply.js by [@​Cangit](https://github.com/Cangit) in fastify/fastify#6136 - docs: join core team by [@​jean-michelet](https://github.com/jean-michelet) in fastify/fastify#6142 - docs: fix typo in hash.digest function by [@​piotr-cz](https://github.com/piotr-cz) in fastify/fastify#6145 - test: mv hooks from tap by [@​jean-michelet](https://github.com/jean-michelet) in fastify/fastify#6087 - test: improve issue 4959 unit test by [@​Uzlopak](https://github.com/Uzlopak) in fastify/fastify#6147 - chore: Bump markdownlint-cli2 from 0.17.2 to 0.18.1 by [@​dependabot](https://github.com/dependabot) in https://g...
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I've made the transition to api promises for some tests because it simplified the migration, but I've tried to stay as conservative as possible.