A Karma plugin. Adapter for QUnit testing framework.
npm install karma-qunit   
> Adapter for the QUnit testing framework.
The easiest way is to keep karma-qunit as a devDependency in your package.json by running
``bash`
npm install karma-qunit --save-dev
Add qunit in the frameworks array in your karma.conf.js file. Then, in the pluginskarma-qunit
array, add . The following code shows the default configuration:
`js`
// karma.conf.js
module.exports = function (config) {
config.set({
frameworks: ['qunit'],
plugins: ['karma-qunit'],
files: [
'*.js'
]
})
}
You can also pass options for QUnit.config (documented here) as such:
`js
/// karma.conf.js
module.exports = function (config) {
config.set({
frameworks: ['qunit'],
plugins: ['karma-qunit'],
files: [
'*.js'
],
// client configuration
client: {
clearContext: false,
qunit: {
showUI: true,
testTimeout: 5000
}
}
})
}
`
Note: showUI: true needs the clearContext: false option to display correctly in non-debug mode.
----
For more information on Karma see the [homepage]. If you're using karma-qunit` to test Ember.js, you might find Karma's Ember guide helpful.
[homepage]: https://karma-runner.github.io/