custom-icon-badges icon indicating copy to clipboard operation
custom-icon-badges copied to clipboard

Create the structure for server unit tests (using Mocha or other)

Open DenverCoder1 opened this issue 2 years ago • 2 comments

Currently there are no unit tests for the server-side code.

It be useful to be able to test certain things, especially that badges render properly (eg. visiting /badge/-test-blue?logo=issue or similar would return a 200 response code and include the issue icon).

Adding the required file structure and "test-server" command in package.json would be a very helpful start to get it so yarn test or yarn test-server would run mocha or a similar testing library.

If you would like to help with this, it is not necessary to implement all of the necessary tests, but even just one or a few would be fine. The code should be able to import existing modules and test their functionality.

DenverCoder1 avatar Nov 24 '22 03:11 DenverCoder1

Hey @DenverCoder1, thanks for the awesome work. This project is really cool and helpful.

Didn't look at the code yet :sweat_smile: but I want to help with this. ~Is there a route that I should prioritize testing?~

edit: thinking about using vitest for testing

takanome-dev avatar Apr 29 '23 19:04 takanome-dev

Great, thanks!

I don't know much about the differences in testing frameworks, but feel free to choose :+1:

DenverCoder1 avatar Apr 30 '23 10:04 DenverCoder1