-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Migration from tap to mocha #2851
Conversation
24ba185
to
2a4cb64
Compare
Yeah, I don't think that's a good idea. The files are runnable by themselves, and will execute as soon as they are loaded into process, so all mocha is doing is acting as a "load these files" engine. Actually rewriting the tests to Mocha+Chai (or similar) might be a decent path forward though, I know we've got a bit stuck with tap a few times. |
Thanks for that information. I didn't want to rewrite tests initially as I did not know if that is the direction we want to go in. Since it is, I'll change the tests as well. |
7807e01
to
10c9ec0
Compare
a7c7aaf
to
436cc18
Compare
@rvagg I've rewritten tests. I haven't used Regarding the PR, I'm still keeping it as a draft because I want #2650 and #2846 to land first so I can change those tests too, and not leave it to the people who opened those PRs to make needed changes. Besides waiting for those PRs, I consider this work completed. P.S. GitHub makes it look like there are very big changes, but most of them are just indentation and changes from |
9fb124f
to
7a05cfc
Compare
@dennisameling and @dsanders11 when you get time, please review the changes I made to the tests you added in #2650 and #2846 respectively. They were supposed to be just changed from |
@StefanStojanovic, parallel install tests refactor to |
Refactor of the VS2022 tests LGTM ✅️ thank you! |
7a05cfc
to
ecbf5ce
Compare
After make-fetch-happen update GitHub Actions started failing. Migrating from tap to mocha testing framework for GitHub Action stability.
Implemented a simple custom mocha test reporter to replace the default one. Made test report more developer friendly.
ecbf5ce
to
9e5d65a
Compare
Will we do a similar migration in the testing of Node.js? Will we be able to drop |
so for background: tap2junit is used for nice test feedback in jenkins - you can run these tests in ci.nodejs.org and get nice output mocha can do tap output if you want, but none of this is essential, it could all be ditched I think and just get nice mocha output 🤷 |
There is no plan to do that for Node.js tests as they are working well.
These tests are run through GitHub Actions, |
|
Should these changes be landed on https://github.com/nodejs/gyp-next first? |
Are those jobs still in use? They seem outdated and have no build history. Also, I've only seen GitHub Actions in node-gyp repo PRs
I do not know what you mean by this, since these changes change node-gyp tests. From what I saw (went through it very briefly) gyp-next has a |
https://ci.nodejs.org/job/nodegyp-test-pull-request/ One of the benefits of this is the ability to test a broader range of Node versions and platform permutations than CI allows; which is helpful for a project that depends so much on OS-level inputs like node-gyp does. It hasn't been used much recently because the people that might have used it have slowly faded away, leaving us with CI. |
Since we've been discussing this PR for some time, and I see no clear objections to the proposed changes, I just wanted to ask if there's something else I should do to get it approved. |
* migrate from tap to mocha After make-fetch-happen update GitHub Actions started failing. Migrating from tap to mocha testing framework for GitHub Action stability. * write custom test reporter for more verbose output Implemented a simple custom mocha test reporter to replace the default one. Made test report more developer friendly.
Checklist
npm install && npm test
passesDescription of change
After the
make-fetch-happen
update in 02480f6, GitHub Actions started failing. Migrating fromtap
tomocha
testing framework as issues only happened in GitHub Actions (tested locally with various node/python combinations, didn't reproduce any failures). This PR is made based on investigation and work done in #2837 as the simplest and probably the cleanest solution. With these changes,Mocha
replacestap
completely, thus restoring GitHub Actions stability.