Skip to content
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

Add testing section to addon guide #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions markdown/docs/addon-author-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,18 @@ modules it exports will not be available inside the app when running in
the FastBoot environment. Make sure to guard against missing
dependencies in that case.

### How to test it

Automatically testing that your addon does not break the build and that
its components render correctly in a FastBoot environment is more demanding
than the normal Ember tests, as it requires real end to end testing: creating
an Ember app that consumes your addon, serving that from a FastBoot server and
running your tests against some real HTTP responses from that server.

Fortunately you can use one of these addons which simplify these steps considerably:
* [ember-fastboot-addon-tests](https://github.com/kaliber5/ember-fastboot-addon-tests): specifically tailored at easily testing addons for FastBoot compatibility.
* [ember-cli-addon-tests](https://github.com/tomdale/ember-cli-addon-tests): for general testing of addons inside the context of an app. Can be used for implementing an own custom testing solution.

## Browser-Only or Node-Only Initializers

If your addon requires browser-specific or Node-specific initialization
Expand Down