Use new Testing API
Changes
-
Uses the new testing API (RFC's 232 & 268) to run the BDD tests (#65).
- 💥 This is a breaking change. Version 0.4.0 requires your tests to be written according to the new testing API. See the Upgrading section below for more info.
-
Added ability for custom test setup and teardown (#47). See the Annotations | Customization section of the doc for more info.
-
Added configuration of Yadda options (#72). See the Yadda Configuration section of the doc for more info.
Upgrading
To upgrade to the latest version of this addon from a previous release < 0.4.0, including refactoring your existing tests to Ember's new testing APIs, follow these steps:
- Install the latest version of ember-cli-yadda.
- Run
ember g ember-cli-yadda
to add the most recent files from the blueprint to your project. - Add the appropriate setup annotation to each Feature or Scenario.
- Refactor your step files to use the new testing APIs:
- for application tests, skip using Ember's global test helpers and use those provided by @ember/test-helpers.
- use
async
/await
for all asynchronous operations, includingandThen()
- ember-test-helpers-codemod will be able to do most of
these changes automatically - For further details have a look at the Migration Guide for QUnit
or the Migration Guide for Mocha
- Optional: customize
tests/helpers/yadda-annotations.js
with any additional setup logic that is needed, see Annotations | Custumization.