Maelstromeous / satisfactory-factories

A tool to visualise groupings of factories to create a true Modular Factory setup for the game Satisfactory.
https://satisfactory-factories.app
GNU Affero General Public License v3.0
7 stars 2 forks source link

CI: Enable tests for web component #43

Open Maelstromeous opened 3 hours ago

Maelstromeous commented 3 hours ago

Going to start moving towards using PRs for feature development, which should have tests as a mandatory check before they're allowed to merge.

Could look into code coverage via SonarCloud, where all new code needs tests behind it. Would slow down development but increase quality.

samsmithnz commented 3 hours ago

I was thinking about a sprint to just add unit tests. I can see some opportunities to make it easier to write unit tests with helper functions too.

I do agree we need more tests before features.

Maelstromeous commented 3 hours ago

I'm certainly no expert on tests so if you have any knowledge you wish to impart I'm all ears 😄 I'd say I "dabble", I've yet to make a project that is 100% tested, especially on the frontend side of things.

Was thinking we just cover most of the logic in both the factory planner system and core components of the backend / parser. Parser especially likely should be covered if it ever gets expanded.

samsmithnz commented 2 hours ago

I've written lots of articles about testing... but yeh - let's focus on the logic and testing the backend, and then look at what can be tested on the front end. Front end is always hardest - but once the back end is solid, the front end is usually the piece that changes a lot too.