From ea5030cc5bda513ac97106023374f315f5b54f29 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 8 Aug 2024 19:56:49 +0100 Subject: [PATCH] docs: Add QUnit compatibility table Ref https://github.com/gruntjs/grunt-contrib-qunit/issues/209. --- CHANGELOG | 1 + README.md | 32 ++++++++++++++++++-------------- docs/qunit-overview.md | 30 +++++++++++++++++------------- 3 files changed, 36 insertions(+), 27 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d437885..625aa29 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ v10.1.0: v10.0.0: date: 2024-06-18 changes: + - Require QUnit 2.17 or later. - Remove support for delaying qunit.js via RequireJS. AMD continues to be supported for loading source code and tests, but load qunit.js in its own script before RequireJS, and reference QUnit directly. Examples on [qunitjs.com](https://qunitjs.com/api/config/autostart/). v9.1.1: diff --git a/README.md b/README.md index 29d726f..38f5b1e 100644 --- a/README.md +++ b/README.md @@ -31,15 +31,12 @@ unit test suite run automatically each time you commit changes to your code. This is where the `grunt-contrib-qunit` plugin comes in the play: -`grunt-contrib-qunit` lets you run your tests in the invisible Chrome +`grunt-contrib-qunit` lets you run your tests in a Headless Chrome browser, thus converting your unit test suite into something you can run -from a script, a script you can have automatically run on travis-ci (or the -Continuous Integration service of your choice) which in turn can alert you -of any rule-breaking commit to your code. +from the command-line, and from any automated continuous integration service, +which in turn can alert you of any failing tests. -You can still monitor the status of your unit tests suite visiting your html -test page in your browser, but with `grunt-contrib-qunit` you can also run -the same suite from the command line interface. +You can debug your unit tests suite browsing your [HTML test page in your browser](https://qunitjs.com/browser/). This plugin defines one single task: `qunit`. Configure it in your `Gruntfile.js`, run it with the `grunt qunit` command. @@ -54,15 +51,22 @@ This will almost certainly be needed in order to run Chrome in a CI environment [Puppeteer]: https://pptr.dev/ -#### OS Dependencies -This plugin uses Puppeteer to run tests in a Chrome process. Chrome requires a number of dependencies that must be installed, depending on your OS. -Please see Puppeteer's docs to see the latest docs for what dependencies you need for your OS: +#### QUnit version -https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md +The current version of `grunt-contrib-qunit` supports QUnit 2.17.0 and later. -#### QUnit version +| grunt-contrib-qunit | QUnit +|--|-- +| grunt-contrib-qunit 10 and later | QUnit 2.17 and later +| grunt-contrib-qunit 9 | QUnit 2.2.0 and later +| grunt-contrib-qunit 5 | QUnit 1.x + +#### System dependencies + +This plugin uses Puppeteer to run tests in a Chrome process. Chrome requires a number of dependencies that must be installed, depending on your OS. +Please see Puppeteer's docs to see the latest docs for what dependencies you need for your OS: -The plugin supports QUnit 2.2.0 and later. To test with QUnit 1.x, use grunt-contrib-qunit 5. +https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md ### Options @@ -274,7 +278,7 @@ grunt.event.on('qunit.on.testEnd', function (test) { * 2024-07-18   v10.1.1   Fix formatting of non-string errors from `QUnit.on('error')` events. * 2024-07-18   v10.1.0   Include errors from `QUnit.on('error')` in the output. - * 2024-06-18   v10.0.0   Remove support for delaying qunit.js via RequireJS. AMD continues to be supported for loading source code and tests, but load qunit.js in its own script before RequireJS, and reference QUnit directly. Examples on [qunitjs.com](https://qunitjs.com/api/config/autostart/). + * 2024-06-18   v10.0.0   Require QUnit 2.17 or later. Remove support for delaying qunit.js via RequireJS. AMD continues to be supported for loading source code and tests, but load qunit.js in its own script before RequireJS, and reference QUnit directly. Examples on [qunitjs.com](https://qunitjs.com/api/config/autostart/). * 2024-06-11   v9.1.1   Remove dependency on `p-each-series` package. * 2024-06-11   v9.1.0   Re-introduce `qunit.log` Grunt event. * 2024-06-09   v9.0.0   Update to Puppeteer 22. Require Node.js 18 or later. Remove [details parameter](https://qunitjs.com/api/callbacks/QUnit.done/) to Grunt event `qunit.done`, deprecated since QUnit 2.2. Remove Grunt events `qunit.testStart`, `qunit.log`, `qunit.testDone`, `qunit.moduleStart`, `qunit.moduleDone`. Use `qunit.on.*` instead. diff --git a/docs/qunit-overview.md b/docs/qunit-overview.md index cb03387..87b12b8 100644 --- a/docs/qunit-overview.md +++ b/docs/qunit-overview.md @@ -5,15 +5,12 @@ unit test suite run automatically each time you commit changes to your code. This is where the `grunt-contrib-qunit` plugin comes in the play: -`grunt-contrib-qunit` lets you run your tests in the invisible Chrome +`grunt-contrib-qunit` lets you run your tests in a Headless Chrome browser, thus converting your unit test suite into something you can run -from a script, a script you can have automatically run on travis-ci (or the -Continuous Integration service of your choice) which in turn can alert you -of any rule-breaking commit to your code. +from the command-line, and from any automated continuous integration service, +which in turn can alert you of any failing tests. -You can still monitor the status of your unit tests suite visiting your html -test page in your browser, but with `grunt-contrib-qunit` you can also run -the same suite from the command line interface. +You can debug your unit tests suite browsing your [HTML test page in your browser](https://qunitjs.com/browser/). This plugin defines one single task: `qunit`. Configure it in your `Gruntfile.js`, run it with the `grunt qunit` command. @@ -28,12 +25,19 @@ This will almost certainly be needed in order to run Chrome in a CI environment [Puppeteer]: https://pptr.dev/ -## OS Dependencies -This plugin uses Puppeteer to run tests in a Chrome process. Chrome requires a number of dependencies that must be installed, depending on your OS. -Please see Puppeteer's docs to see the latest docs for what dependencies you need for your OS: +## QUnit version -https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md +The current version of `grunt-contrib-qunit` supports QUnit 2.17.0 and later. -## QUnit version +| grunt-contrib-qunit | QUnit +|--|-- +| grunt-contrib-qunit 10 and later | QUnit 2.17 and later +| grunt-contrib-qunit 9 | QUnit 2.2.0 and later +| grunt-contrib-qunit 5 | QUnit 1.x + +## System dependencies + +This plugin uses Puppeteer to run tests in a Chrome process. Chrome requires a number of dependencies that must be installed, depending on your OS. +Please see Puppeteer's docs to see the latest docs for what dependencies you need for your OS: -The plugin supports QUnit 2.2.0 and later. To test with QUnit 1.x, use grunt-contrib-qunit 5. +https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md