Skip to content

Migrate from tap to Node Test Runner #573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

matteo-gobbo
Copy link

Hi,

The goal of this PR is migrate the tests from Tap to Node test runner, following what's been said in the issue fastify/fastify#5555

Checklist

@matteo-gobbo matteo-gobbo changed the title Migrate from tap to node Migrate from tap to Node Test Runner Mar 16, 2025
@matteo-gobbo matteo-gobbo marked this pull request as ready for review March 16, 2025 16:09
@Fdawgs
Copy link
Member

Fdawgs commented Mar 16, 2025

Thanks for the PR! .taprc also needs removing as part of this (but kept in .gitignore).

@Eomm
Copy link
Member

Eomm commented Apr 6, 2025

Could you run npm run lint:fix? it should fix the CI

@matteo-gobbo
Copy link
Author

matteo-gobbo commented Apr 6, 2025

The issue here is using const tmpdir = fs.mkdtempSync(path.join(os.tmpdir(), '')) instead of the previous t.testDir() that was implemented directly inside tap.
Do you have any suggestions about this? Perhaps there are other projects where a similar approach has been implemented that I could use as a reference?"

Thank you in advance for your answer.

@Eomm
Copy link
Member

Eomm commented Apr 13, 2025

The issue here is using const tmpdir = fs.mkdtempSync(path.join(os.tmpdir(), '')) instead of the previous t.testDir() that was implemented directly inside tap. Do you have any suggestions about this? Perhaps there are other projects where a similar approach has been implemented that I could use as a reference?"

Thank you in advance for your answer.

If i check the testdir implementation I think it was using a path in the project's folder (such as .tap/fixtures).
So I think we may not create the ostmp by a random folder in a similar way (that we must add to the gitignore)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants