Support custom tests location#46
Open
robyoder wants to merge 6 commits into
Open
Conversation
Author
|
Hey, @zwilias, can you take a look? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The docs indicate that a custom tests location is supported using the
--testsarg, but as shown in #44, this doesn't actually work.Resolves #44
The fix was a single line change, but there was a bit of work to do to add a test project to show the issue. I've split the commits into semantic chunks that should tell a pretty clear story:
Fix local
elm makein test project — when I was looking to add a new test project I started by trying to build and run the tests in the existing one.elm makefailed there with some concerns about elm.json. Even thoughelm-testworked fine, I figured it was worth improving the integrity of the test project.Ignore generated coverage files — running
elm-coveragein the test project generated coverage files that were not ignored.Support multiple test projects — the existing tests had
simplehardcoded throughout, so to avoid duplicating them all, I refactored them into a loop that could be extended with additional test projects.Add (failing) tests for custom tests location — this is a copy of the simple case, adjusted to showcase the issue outlined in Cannot run with non-default tests location #44. I committed this alone so it would be easy to verify the failure and the coming fix.
Fix issue with custom tests location — the one-line fix: wherever the tests were before, they should still be in the instrumented directory so that the
elm.jsonfile remains accurate.Remove unused lines — tiny cleanup of unused lines that distracted me when I was reading lib/runner.js.