ember-cli-code-coverage
ember-cli-code-coverage copied to clipboard
Unable to specify custom host and port for `/write-coverage` request
Hi Katie! Thanks for an amazing ember addon!
Recently we successfully integrated it with our application but in order to generate the report, we have to do one manual change in the addon's source code.
Here is the point: in the lib/templates/test-body-footer.html the /write-coverage request is configured to be sent at the same port as the page is running but in our case, it should be sent to another port which is not possible to configure in the existing releases of ember-cli-code-coverage. Thus we have to manually change /write-coverage to http://localhost:4200/write-coverage to set the proper host and port:
request.open('POST', '/write-coverage', REQUEST_ASYNC); -> request.open('POST', 'http://localhost:4200/write-coverage', REQUEST_ASYNC);
In our case, we have two parallel test runners so without making this change the /write-coverage requests will be sent to http://localhost:4221/write-coverage and http://localhost:4222/write-coverage URLs but our goal is to send them both to the port 4200.
In other words, it would be great to get rid of this manual maintaining and have the ability to customize the host and port in ember-cli-build.js config.
Thanks a lot, Roman.
Hi @roman-vasilenko, a PR would be welcome to make it configurable!