kantord / LibreLingo

🐢 🌎 📚 a community-owned language-learning platform
https://librelingo.app
GNU Affero General Public License v3.0
1.92k stars 209 forks source link

remove apps/web/src/courses/test #1815

Open szabgab opened 2 years ago

szabgab commented 2 years ago

This directory is generated from courses/test/ so it should not be committed in git.

kantord commented 2 years ago

Why should it not be committed in git?

Actually the purpose of committing it in git is to see the changes in JSON files when you make changes to the output format of the YAML -> JSON conversion.

Another added convenience is that you can run the tests out of the box. Otherwise there would be an added step to do each time before you run the text.

szabgab commented 2 years ago

Generally I think files that can be generated should not be committed. If you are using them to verify that the test course can be exported and you get the same files again, then I'd put them in a different location and then the test would compare them.

kantord commented 2 years ago

then I'd put them in a different location and then the test would compare them.

what do you mean a different location?

Generally I think files that can be generated should not be committed.

I'm not sure I agree with this. It depends somewhat on the use case. It's nice to avoid it if it can be done, but it can be the better solution to have generated files in the repo sometimes. In this case I really like the ability to see the effect of changes on the JSON output and the fact that running tests is a simple process that doesn't need previous setup such as generating fixture data