I could only find one way to include the engine code in the testing. It involves adding the script tags manually in the tests/index.html
<script src="{{rootURL}}engines-dist/my-engine/assets/engine.js"></script>
<script src="{{rootURL}}engines-dist/my-engine/assets/engine-vendor.js"></script>
Lazy engines documentation describes the app
folder in the following way:
Assets in this folder don't make sense and will be ignored as they break the isolation guarantees of engines.
The above makes sense but I was unable to lazy load an engine without adding the <script>
tags manually.
Another interesting fact is that if you do use the engine's custom resolver like this setupTest/setupRenderingTest(hooks, { customEngineResolver });
You will need the following things properly installed on your computer.
- Git
- Node.js (with npm)
- Ember CLI
- Google Chrome
git clone <repository-url>
this repositorycd engine-testing
npm install
ember serve
- Visit your app at http://localhost:4200.
- Visit your tests at http://localhost:4200/tests.
Make use of the many generators for code, try ember help generate
for more details
ember test
ember test --server
ember build
(development)ember build --environment production
(production)
Specify what it takes to deploy your app.