# karma-qunit

> A Karma plugin. Adapter for QUnit testing framework.

Latest version **4.2.1** (published 2024-08-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install karma-qunit
pnpm add karma-qunit
yarn add karma-qunit
bun add karma-qunit
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.2.1 |
| Published | 2024-08-19 |
| First published | 2013-03-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 52 |
| Author | Vojta Jina |
| Maintainers | krinkle, dignifiedquire, zzo, vojtajina, karmarunnerbot, xhmikosr |
| Keywords | karma, karma-plugin, karma-adapter, qunit |

## Links

- npm: https://www.npmjs.com/package/karma-qunit
- Repository: https://github.com/karma-runner/karma-qunit
- Homepage: https://github.com/karma-runner/karma-qunit#readme
- Issues: https://github.com/karma-runner/karma-qunit/issues
- npm.io page: https://npm.io/package/karma-qunit

## Recent versions

- 4.2.1 (latest) — 2024-08-19
- 4.2.0 — 2024-02-13
- 4.1.2 — 2021-02-03
- 4.1.1 — 2020-05-06
- 4.1.0 — 2020-05-04
- 4.0.0 — 2019-07-15
- 3.1.3 — 2019-07-15
- 3.1.2 — 2019-04-11
- 3.1.1 — 2019-04-09
- 3.1.0 — 2019-04-04
- 3.0.0 — 2019-02-28
- 2.1.0 — 2018-05-16
- 2.0.2 — 2018-05-02
- 2.0.1 — 2018-03-14
- 2.0.0 — 2018-03-14
- … 17 more at https://npm.io/package/karma-qunit/versions

## README

# karma-qunit

[![npm version](https://img.shields.io/npm/v/karma-qunit?style=flat-square&logo=npm&logoColor=fff)](https://www.npmjs.com/package/karma-qunit) [![Build Status](https://img.shields.io/github/actions/workflow/status/karma-runner/karma-qunit/test.yml?style=flat-square&logo=github&branch=master)](https://github.com/karma-runner/karma-qunit/actions/workflows/test.yml?query=workflow%3ATests+branch%3Amaster) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen?style=flat-square)](https://github.com/karma-runner/karma-qunit) [![npm downloads](https://img.shields.io/npm/dm/karma-qunit?style=flat-square)](https://www.npmjs.com/package/karma-qunit)

> Adapter for the [QUnit](https://qunitjs.com/) testing framework.

## Installation

The easiest way is to keep `karma-qunit` as a devDependency in your `package.json` by running

```bash
npm install karma-qunit --save-dev
```

## Configuration

Add `qunit` in the `frameworks` array in your `karma.conf.js` file. Then, in the `plugins`
array, add `karma-qunit`. 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](https://api.qunitjs.com/config/QUnit.config)) 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](https://karma-runner.github.io/latest/plus/emberjs.html) helpful.

[homepage]: https://karma-runner.github.io/

---
_Source: https://npm.io/package/karma-qunit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
