-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix code extractor to match elm-test-rs
2.x
#38
Conversation
Solves exercism#30. The code extractor can now: - Find test/describe inside of a let declaration - Find test/describe pretty much anywhere (if, record, tuple...) - Handle more than one top-level `Test` - Find tests in arbitrarily nested describe - Write test name as "describe name 1 > describe name 2 > ... > test name"
elm-test-rs
2.0.1elm-test-rs
2.x
Are there tests to verify that this doesn't break anything? |
Heh, all the tests are in the other PR :p |
👍 |
Thanks @jiegillet could you explain the main changes introduced in the extracting code to handle these situations? Also, regarding the current limitations, it is nice to better handle test expressions that can start with other things than For example, in case of usage of Similarly, any kind of expression that results in unknowns when considering only the part of the code with the expectations (the snippet) can cause some confusion for students if they don't have the whole context in the test snippet. So I'm wondering if instead of trying to handle those situations, we might want instead to output some keywords that our CI can spot and report to fail before merging such tests with ambiguous snippets extractions. |
Considering the comment above, it might be worth splitting this PR in two. (1) the part that updates the test (1) is unambiguously good and needed before merging the 2.0.1 elm-test-rs update. (2) might need some more discussions |
Alright. For this PR, (1) and (2) are deeply intertwined, so I reverted to the original version and did the minimal changes to achieve (1). For the rest, I do agree that we should have tests that capture as much information as possible in the body of the test, especially for concept exercises. We could have CI checks, but ultimately it seems to me that code review is the most important tool we have. However, as we repeatedly saw with So in my opinion (in the future), we should
|
d791f59
to
de211d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
@ErikSchierboom could you merge this? |
Sure! |
This solves #30 and #34.
Please check commits for details.
I didn't add tons of tests to test all of the branching, because I think the vast majority would be convoluted and unrealistic code.
This should be merged before #36, because it also introduces the new test name path "describe name 1 > describe name 2 > ... > test name".