Open tisonkun opened 1 month ago
Other solutions for SQL tests can be found like:
Despite the DSL and inputs part, you may notice it contains multiple statements and all the output in one file.
Do inline snapshots help here? Over at PRQL we use them a lot for small snapshots...
@max-sixty Yeah ... This sounds reasonable and it would take almost the same lines like sqllogictest/sqlness linked above.
So snapshot files are mainly for large outputs and inline snapshots are encouraged for other scenarios?
So snapshot files are mainly for large outputs and inline snapshots are encouraged for other scenarios?
Yes, that's how I generally think about them (though just my view, not necessarily the project's...)
Hi @mitsuhiko! Thanks for releasing this amazing crate for snapshot tests :D
I'm currently using insta to write SQL tests and assert the result set as snapshot. For demonstration, it looks like:
This works well. But it generates one snapshot file per assertions, and I will have thousands of SQL statements to test and it creates too many files to store the snapshot.
Thus, I wonder if it's possible to group multiple assertions so that their snapshots are stored into one file.
Looking forward to your feedback.