snapshot-test-insta #42

Merged
sb10q merged 3 commits from snapshot-test-insta into master 2021-10-03 16:39:13 +08:00
Collaborator

Use a library called 'insta' to better organize those longer correct test outputs in toplevel tests. 'insta' creates .snap files as snapshots of the test output, and will automatically do the diff if the output is different. This makes maintaining test cases with larger outputs a lot easier.

Use a library called 'insta' to better organize those longer correct test outputs in toplevel tests. 'insta' creates `.snap` files as snapshots of the test output, and will automatically do the diff if the output is different. This makes maintaining test cases with larger outputs a lot easier.
ychenfo added 2 commits 2021-10-03 16:24:57 +08:00
ychenfo added 1 commit 2021-10-03 16:28:03 +08:00
sb10q reviewed 2021-10-03 16:31:45 +08:00
@ -367,55 +250,7 @@ fn test_simple_function_analyze(source: Vec<&str>, tys: Vec<&str>, names: Vec<&s
pass
"}
],
vec![

In what situation do you use insta and in what situation do you use this vector?

In what situation do you use insta and in what situation do you use this vector?
Poster
Collaborator

Oh currently for the shorter error cases tests I use this vector, for the normal tests with longer outputs I use insta.

Maybe I could split the error cases and normal cases to two different sets of tests, one totally use insta and the other not use insta at all?

Oh currently for the shorter error cases tests I use this vector, for the normal tests with longer outputs I use insta. Maybe I could split the error cases and normal cases to two different sets of tests, one totally use insta and the other not use insta at all?

Oh currently for the shorter error cases tests I use this vector, for the normal tests with longer outputs I use insta.

That is fine, just wondering.

> Oh currently for the shorter error cases tests I use this vector, for the normal tests with longer outputs I use insta. That is fine, just wondering.
sb10q merged commit f5ce1afe0b into master 2021-10-03 16:39:13 +08:00
sb10q referenced this issue from a commit 2021-10-03 16:39:13 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#42
There is no content yet.