Replies: 1 comment 1 reply
-
That would be fantastic. I'd accept such a PR for sure 😄, even if it was in a simpler/restricted form. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It might be interesting to have a test suite that checks that we still catch errors after refactoring. I've started experimenting with this in my fork.
My idea is to write some Toml files describing inputs and the expected error:
Then we have a test runner that generates a temporary file tree with the specified queries and migrations, runs cornucopia CLI on it and checks the returned error. By testing at the boundaries, we can change the underlying code without changing the tests and when we change the error message, we should have an option for the test runner to automatically update the error message in the test descriptor.
By the way, your error messages are really good and user-friendly!
Do you find this useful? Would you prefer something simpler or no test at all for this?
Beta Was this translation helpful? Give feedback.
All reactions