-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Convert test infa to something more reliable and new #649
Comments
Hi, I've started working on this. I'm looking to move to mocha as the test framework, just replacing the Makefile + run. It should:
In this first pass I'll be making minimal changes to the test logic, other than sandboxing program config (i.e. using Shout if there's any issues with any of this! 😃 |
Although I like mocha, I think ava would be the best fit for this project. It's extremely simple and lightweight, and it can continue the practice of running the test files in separate node processes. To help move this discussion forward, I started PR #755 with just two of the test files migrated. This should hopefully provide enough context to help the group come to a decision about whether or not this is the right choice.
I totally agree we should be using
Given that 4 is the minimum node version supported, there's no reason not to use lambdas at least. |
Adding some notes for reference. Mocha and AVA are mentioned in this issue, and @mojavelinux has prototyped some tests with AVA in #755. (Thanks! Nice demo without wasting effort if go with something else.) Jest is mentioned in #661. I use Jest for testing my own CLI project including commander, and have not used AVA or Mocha. For interest, I checked weekly downloads from npmjs.com:
https://stackshare.io/stackups/ava-vs-jest-vs-mocha (Side note: tests can run on Windows already with a little work! #916) |
I am for mocha because it is almost every where on projects where I work. Jest is from React world. |
@mojavelinux converted a couple of the test files to ava in #755 to show what it looks like, which I thought was a useful way of seeing real code for a modest time investment. If someone is interested in showing what it would look like using (And I made the same invitation in #927 for |
Started move to Jest in #1035. |
Moved to Jest on the develop branch for the next release (#1035). |
v4.0.0-0 prerelease published: #1067 |
v4.0.0 has been released. |
commander.js has pretty old test infra based on sinon and should, we can convert it to something more popular. With convertion we may archive the following goals: keep it up to date to today's requirements, to make it easier to make contributions and convert it to es6 (that plan, I has in my mind), and, finally, to make it cross-platform. The current test infra can only be run on *nix systems, but no way to run test on env. that has no bash (or similar shells) and make, like windows.
The text was updated successfully, but these errors were encountered: