Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call hook before and after in ember-qunit tests?

I have to exec some code before all tests began. So I need to use QUnit hook before but in ember-qunit the only callbacks available are beforeEach and afterEach.

How can I perform that?

like image 891
EnriMR Avatar asked Oct 05 '16 17:10

EnriMR


1 Answers

When I wrote my first comment on this quesion, the repository were like this: qunit-module.js. So it seems there were no support for before and after hooks. So my suggestion was initiating the manager before module function, shown as in this twiddle.

But, 5 days ago, trentmwillis submitted a commit and it seem master now a has the before and after hooks. I guess ember-qunit's 2.1.2 version has this commit.

like image 169
ykaragol Avatar answered Oct 19 '22 06:10

ykaragol