Have the repository use Mocha and Chai to test stuff#190
Merged
Conversation
I think I did this right... *fingers crossed*
it would be nice to recive these errors all at once...
Contributor
Author
|
@geoffrey-wu thank you for fixing all of that 👍 |
geoffrey-wu
added a commit
that referenced
this pull request
Jul 31, 2025
Have the repository use Mocha and Chai to test stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is my first time contributing big changes like this, and it was compiled to Git Hub from a messy draft that was worked on for a while. Everything should work correctly (according to ESLint), but I still think this could use some extra eyes, especially with the
package.jsonfile.As qbreader gets more and more stuff added, making sure everything functions right becomes more and more important. That's why I propose implementing the tests with a library and framework specifically built for doing just that.
It should be easier and quicker to add new tests now, and save everyone from all of the boring labor of having to set these up manually :)
A few things to know:
requiremocha. Coming from Python and C#, that doesn't seem right, but maybe JS has some global import feature?package.json,you'll see I addednpm testto the"build"string. That way, the testing will (supposedly) automatically be run with each build.describefunction is asynchronous, but none of the documentation usedawaitwith it. There might be some wacky thing that happens to thesuccessfulandtotalvariables in the server tests. If said wacky thing does happen, that's why.