-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Changes for consolidation #768
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
Conversation
…tually returns the combinations. Fix test (was not running, .mjs not matching Jest pattern) and work.
… instead of logging them + add Jest test.
… within a print method).
Is this done? If it is not, please convert the pr to draft. |
Nope, there is a lot more to do... converting to draft. |
@lvlte Please try to avoid using the jest mock functions. Remove the console logs wherever possible, and only use the mock functions where the console logs are a part of the solution. |
That is what I'm doing : algorithms having a print/view/display method rely on console.log, which I leave (in this case only) as a default output callback. Such callback can then be overriden by a mock function so that expected results can be checked by Jest with For logs that are used to print results on the fly as they appears (outside of a print function), I use an output array where the results are pushed, and return the output. All other logs & live code that don't tell what result is expected are removed, and their content is left as a comment when it gives useful information. |
Hi @raklaptudirm and all, This is strange, this commit 9218a5c causes the build to fail, but I don't get why. The error says : Do you have any idea ? [EDIT] : this is fixed, it was a typo (lower instead of uppercase), which on my (Windows) machine does not make a difference. |
It was tedious but I think I'm finally done with this PR. |
Ahh, the good old case-insensitive file system stuff 😺 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Holy crap, you've been hella busy!!
tbh I did not review all 155 changed files thoroughly but as far as I can tell, this looks nice. 👍
I'd even recommend: Fixes #720 |
Thanks, I've added the keyword in the PR description. |
@cclauss a review please. |
Full switch to ESM.
Remove live code examples (either convert to Jest test or leave hints as a comment).
Remove all console.log (except if encapsulated within a specific method/function).
Revise all algorithms logging results instead of returning them.
...
Fixes #720