Preserve pathname when linking to individual tests in HTML reporter #1464
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.
When I use Mocha in the browser in an Ember CLI application via ember-cli-mocha, the links to run individual tests are broken. The tests run from here:
http://localhost:4200/tests
The test links look like this:
Sadly, an
href
beginning with?
doesn’t link to a query on the current path, but instead to a query on the root. In the above example, it links tohttp://localhost:4200/?grep=Edit%20an%20issue
.I can click the link and put
/tests
back at the beginning of the path, but this patch would fix the links for me and anyone using Mocha with Ember CLI. The tests all still pass, I can’t imagine it having a negative impact anywhere.