tomdale / ember-cli-addon-tests

31 stars 18 forks source link

Document use cases #104

Open simonihmig opened 7 years ago

simonihmig commented 7 years ago

This issue is for collecting possible use cases for this addon, as suggested by @stefanpenner, as this can be used in various ways that might not be obvious at the first look. The outcome of this could maybe find its way into the documentation at some point. So please feel free to supplement this with your own cases!

General use cases:

Reasons to use this addon as opposed to setting up your tests manually:

kellyselden commented 7 years ago

Another usecase here https://github.com/tomdale/ember-cli-addon-tests/pull/106#issuecomment-315264011

jelhan commented 5 years ago

Testing of development server middleware registered by an addon (serverMiddleware hook) is another use case. E.g. ember-cli-content-security-policy verifies that correct HTTP headers are applied: https://github.com/rwjblue/ember-cli-content-security-policy/blob/9a44defc15af31e30a3e05e68f95ca092a07e70f/node-tests/e2e/deliver-test.js#L89-L97

Similar to testing with different dependencies it could be used to test against different options passed to ember commands. E.g. ember-cli-content-security-policy uses it to test that it respects a --live-reload-host option used on ember serve: https://github.com/rwjblue/ember-cli-content-security-policy/blob/9a44defc15af31e30a3e05e68f95ca092a07e70f/node-tests/e2e/deliver-test.js#L158-L181