karma-qunit
Advanced tools
Comparing version 4.1.2 to 4.2.0
@@ -5,11 +5,11 @@ (function(window) { | ||
function createQUnitConfig (karma, defaultConfig) { // eslint-disable-line no-unused-vars | ||
var config = defaultConfig || {} | ||
if (!karma.config || !karma.config.qunit) { | ||
return config | ||
function createQUnitConfig (karma) { // eslint-disable-line no-unused-vars | ||
var config = { | ||
autostart: false | ||
} | ||
for (var key in karma.config.qunit) { | ||
config[key] = karma.config.qunit[key] | ||
if (karma.config && karma.config.qunit) { | ||
for (var key in karma.config.qunit) { | ||
config[key] = karma.config.qunit[key] | ||
} | ||
} | ||
@@ -117,5 +117,13 @@ | ||
runner.load() | ||
// honor autostart config, useful for tests loaded asynchronously | ||
// karma-qunit uses `QUnit.config.autostart = false` internally | ||
// so window.__karma__.start (points to here) controls QUnit.start | ||
// and thus naturally waits for any file-loading karma plugins | ||
// (especially async like AMD/RequireJS). | ||
// | ||
// ensure the the option to turn off QUnit autostart is also | ||
// available to end-users, by letting them set `qunit.autostart: false` | ||
// in karma.config.js. The end-user may then call QUnit.start() when | ||
// they are ready. | ||
// | ||
// https://github.com/karma-runner/karma-qunit/issues/27 | ||
if (config.autostart !== false) { | ||
@@ -129,5 +137,3 @@ setTimeout(function () { | ||
var config = createQUnitConfig(window.__karma__, { | ||
autostart: false | ||
}); | ||
var config = createQUnitConfig(window.__karma__); | ||
@@ -138,9 +144,3 @@ for (var key in config) { | ||
if (window.removeEventListener) { | ||
window.removeEventListener('load', window.QUnit.load, false); | ||
} else if (window.detachEvent) { | ||
window.detachEvent('onload', window.QUnit.load); | ||
} | ||
window.__karma__.start = createQUnitStartFn(window.__karma__); | ||
})(typeof window !== 'undefined' ? window : global); |
{ | ||
"name": "karma-qunit", | ||
"version": "4.1.2", | ||
"version": "4.2.0", | ||
"description": "A Karma plugin. Adapter for QUnit testing framework.", | ||
@@ -35,43 +35,38 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"chai": "^4.2.0", | ||
"eslint": "^6.8.0", | ||
"eslint-config-standard": "^14.1.1", | ||
"eslint-plugin-import": "^2.22.1", | ||
"chai": "^4.3.4", | ||
"eslint": "^7.32.0", | ||
"eslint-config-standard": "^15.0.1", | ||
"eslint-plugin-import": "^2.25.3", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-promise": "^5.2.0", | ||
"eslint-plugin-standard": "^4.1.0", | ||
"grunt": "1.1.0", | ||
"grunt": "^1.4.1", | ||
"grunt-bump": "^0.8.0", | ||
"grunt-npm": "0.0.2", | ||
"karma": "^5.2.3", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-firefox-launcher": "^1.3.0", | ||
"karma-jasmine": "^3.3.1", | ||
"mocha": "^7.2.0", | ||
"qunit": "^2.14.0" | ||
"karma": "^6.3.9", | ||
"karma-firefox-launcher": "^2.1.2", | ||
"karma-jasmine": "^4.0.1", | ||
"mocha": "^9.1.3", | ||
"qunit": "^2.17.2" | ||
}, | ||
"peerDependencies": { | ||
"karma": "^4.0.0 || ^5.0.0 || ^6.0.0", | ||
"qunit": "^2.0.0" | ||
"qunit": "^2.1.1" | ||
}, | ||
"license": "MIT", | ||
"contributors": [ | ||
"Friedel Ziegelmayer <dignifiedquire@gmail.com>", | ||
"XhmikosR <xhmikosr@gmail.com>", | ||
"Vojta Jina <vojta.jina@gmail.com>", | ||
"Friedel Ziegelmayer <dignifiedquire@gmail.com>", | ||
"dignifiedquire <dignifiedquire@gmail.com>", | ||
"dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>", | ||
"johnjbarton <johnjbarton@johnjbarton.com>", | ||
"Timo Tijhof <krinkle@fastmail.com>", | ||
"Matt DuVall <matt@stripe.com>", | ||
"masubi <justin.masui@gmail.com>", | ||
"Johann-S <johann.servoire@gmail.com>", | ||
"Timo Tijhof <krinklemail@gmail.com>", | ||
"dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>", | ||
"Friedel Ziegelmayer <friedel.ziegelmayer@gmail.com>", | ||
"Aymeric Beaumet <hi@aymericbeaumet.com>", | ||
"Mark Ethan Trostler <mark@zzo.com>", | ||
"Stefan Sechelmann <stefan@sechel.de>", | ||
"masubi <justin.masui@gmail.com>", | ||
"Aymeric Beaumet <aymeric@beaumet.me>", | ||
"Aliaksei Sapach <dreamsonic@tut.by>", | ||
"Ulrich Block <u.block@sap.com>", | ||
"masubi <masubi@users.noreply.github.com>", | ||
"Aliaksei Sapach <aliaksei.dreamsonic@gmail.com>", | ||
"Aliaksei Sapach <dreamsonic@tut.by>", | ||
"Aymeric Beaumet <aymeric.beaumet@gmail.com>", | ||
"Brian Donovan <donovan@squareup.com>", | ||
@@ -78,0 +73,0 @@ "Daniel Herman <daniel.c.herman@gmail.com>", |
# karma-qunit | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/karma-runner/karma-qunit) | ||
[![npm version](https://img.shields.io/npm/v/karma-qunit.svg?style=flat-square)](https://www.npmjs.com/package/karma-qunit) [![npm downloads](https://img.shields.io/npm/dm/karma-qunit.svg?style=flat-square)](https://www.npmjs.com/package/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) | ||
[![Build Status](https://img.shields.io/github/workflow/status/karma-runner/karma-qunit/Tests/master?style=flat-square)](https://github.com/karma-runner/karma-qunit/actions?workflow=Tests) | ||
> Adapter for the [QUnit](https://qunitjs.com/) testing framework. | ||
@@ -15,3 +12,3 @@ | ||
```bash | ||
$ npm install karma-qunit --save-dev | ||
npm install karma-qunit --save-dev | ||
``` | ||
@@ -22,4 +19,3 @@ | ||
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: | ||
array, add `karma-qunit`. The following code shows the default configuration: | ||
@@ -69,2 +65,2 @@ ```js | ||
[homepage]: https://karma-runner.github.com/ | ||
[homepage]: https://karma-runner.github.io/ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10352
15
137
64
1