technologiestiftung / exhibition-remote-control

MIT License
1 stars 1 forks source link

Setup tests #6

Open ff6347 opened 4 years ago

ff6347 commented 4 years ago

This PR is my take on setup testing for the backend. I split up a lot of logic in smaller chunks to allow better unit tests. I also wrote some tests for some utility functions.

you can run the tests and see the (low) coverage by running npm t -- --coverage

The frontend still needs some kind of bundler to make it more testable (IMHO). The idea would be to move the jest.config.js and the current package.json to the backend folder and create a new testing environment for the frontend in the client folder.

Let me know what you think.