QUnit on Yii2
The preferred way to install this extension is through composer.
php composer.phar require --dev --prefer-dist dizews/yii2-qunit "*"
to the require-dev section of your composer.json.
To use this extension, simply add the following code in your application configuration:
return [ //.... 'modules' => [ 'qunit' => [ 'class' => 'dizews\qunit\Module', //'runner' => ['template' => '@app/views/js-tests-runner/index'] //your own tests runner ], ], ];
You can then access QUnit through the following URL:
or if you have enabled pretty URLs, you may use the following URL:
All fixtures decorate by
id which has a name
fixture- + filename.