docs/intro.md
Getting Started in the browser
Check these QUnit tutorials and examples, to make the most of your unit tests!
QUnit supports the following browsers and runtime environments:
<table> <thead> <tr><td></td><th>QUnit 1</th><th>QUnit 2</th><th>QUnit 3</th><th>QUnit 3 (ESM)</th></tr> </thead> <tbody> <tr><th>Internet Explorer</th><td>IE 6-11</td><td colspan=2>IE 9-11</td><td>—</td></tr> <tr><th>Edge</th><td>1+</td><td colspan=2>15+<sup><abbr title="both legacy MSEdge and Chromium-based Edge">[?]</abbr></sup></td><td>16+</td></tr> <tr><th>Firefox</th><td>3.6+</td><td colspan=2>45+</td><td>60+</td></tr> <tr><th>Safari</th><td>4.0+</td><td colspan=2>9.1+</td><td>10.1+</td></tr> <tr><th>Chrome</th><td>1+</td><td colspan=2>58+</td><td>61+</td></tr> <tr><th>Chrome Mobile</th><td>—</td><td colspan=2>49+ (Android 4.4+)</td><td>61+ (Android 7+)</td></tr> <tr><th>Opera</th><td>11+</td><td colspan=2>36+</td><td>48+</td></tr> <tr><th>Android Browser</th><td>2.3 - 5.0</td><td colspan=2>4.3 - 5.0</td><td>—</td></tr> <tr><th>iOS (Mobile Safari)</th><td>4.0+</td><td colspan=2>7.0+</td><td>10.3+</td></tr> <tr><th>PhantomJS</th><td colspan=2>1.x</td><td colspan=2>—</td></tr> <tr><th>Node.js</th><td>—</td><td>10+</td><td colspan=2>18+</td></tr> <tr><th>SpiderMonkey</th><td>—</td><td colspan=3>68+<sup><abbr title="since QUnit 2.14">[?]</abbr></sup></td></tr> </tbody> </table>You can download QUnit 1.x and QUnit 2.x from the release archives.
To report a bug, request a new feature, or ask a question open an issue on GitHub.
You can also find support on StackOverflow. Use the "qunit" hashtag on StackOverflow to search existing questions or ask your own question.
If you need help, or want to participate in sharing and discussing ideas, join us in the chat room on Matrix at #qunitjs_qunit:gitter.im:
Follow us:
Hashtags:
The eslint-plugin-qunit package has a variety of rules available for enforcing best testing practices as well as detecting broken tests.
<span id="release-channels"></span>
These are the official release channels for QUnit releases:
Download:
You can save the qunit-2.25.0.js and qunit-2.25.0.css files directly from the jQuery CDN.
For older versions, browse the release archives.
Or download them via the terminal, and save them in your Git repository.
curl -o qunit.css 'https://code.jquery.com/qunit/qunit-2.25.0.css'
curl -o qunit.js 'https://code.jquery.com/qunit/qunit-2.25.0.js'
npm Registry:
If your development workflow uses Node.js, you can install the qunit package from the npm Registry, using the npm CLI:
npm install --save-dev qunit
Or, if using Yarn:
yarn add --dev qunit
You can then reference these in your HTML:
<link rel="stylesheet" href="./node_modules/qunit/qunit/qunit.css">
<script src="./node_modules/qunit/qunit/qunit.js"></script>
If your project uses an npm alternative that locates packages elsewhere, you may need to generate the HTML dynamically and use require.resolve() to locate qunit/qunit/qunit.js and qunit/qunit/qunit.css. Alternatively, use one of the Integrations such as karma-qunit which can do this for you.
Bower:
QUnit 1.x and QUnit 2.x releases were published to Bower, and remain available there under the qunit package.
For QUnit 3.0 and later, either download and commit the JS and CSS file directly in your project (e.g. using the curl command above), or install the qunit package from npm as a dev dependency.