When I generated my app, a module-for-acceptance.js
was created in test/helpers
. To specify code that I want to run before each acceptance test, I know that I can put it inside the beforeEach
function in there.
How can I go about doing the same thing for component tests?
Just to make sure it is clear - I'm talking about wanting to run the same code before each test, so I don't want to put it in the beforeEach
hook in each individual test file's call to moduleForComponent
.
In case it helps, the code I want to run is from the ember-cli-custom-assertions addon. I just want to specify in one place that assertionInjector
should be called before every component test, rather than specifying it in every file that uses a custom assertion.
Aucun commentaire:
Enregistrer un commentaire