Skip to content

Commit

Permalink
Build commit 8149906
Browse files Browse the repository at this point in the history
  • Loading branch information
Krinkle committed Jun 29, 2024
1 parent 62ee8b2 commit b2ec68c
Show file tree
Hide file tree
Showing 19 changed files with 92 additions and 16 deletions.
2 changes: 2 additions & 0 deletions api/QUnit/hooks/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/config/current/">QUnit.config.current</a>
</li><li class="sidebar-item">
<a href="/api/config/modules/">QUnit.config.modules</a>
</li><li class="sidebar-item">
<a href="/api/config/storage/">QUnit.config.storage</a>
</li><li class="sidebar-item">
<a href="/api/config/urlConfig/">QUnit.config.urlConfig</a>
</li><li class="sidebar-item">
Expand Down
2 changes: 2 additions & 0 deletions api/assert/pushResult/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/config/current/">QUnit.config.current</a>
</li><li class="sidebar-item">
<a href="/api/config/modules/">QUnit.config.modules</a>
</li><li class="sidebar-item">
<a href="/api/config/storage/">QUnit.config.storage</a>
</li><li class="sidebar-item">
<a href="/api/config/urlConfig/">QUnit.config.urlConfig</a>
</li><li class="sidebar-item">
Expand Down
2 changes: 2 additions & 0 deletions api/callbacks/QUnit.on/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/config/current/">QUnit.config.current</a>
</li><li class="sidebar-item">
<a href="/api/config/modules/">QUnit.config.modules</a>
</li><li class="sidebar-item">
<a href="/api/config/storage/">QUnit.config.storage</a>
</li><li class="sidebar-item">
<a href="/api/config/urlConfig/">QUnit.config.urlConfig</a>
</li><li class="sidebar-item">
Expand Down
2 changes: 2 additions & 0 deletions api/config/current/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/config/current/">QUnit.config.current</a>
</li><li class="sidebar-item">
<a href="/api/config/modules/">QUnit.config.modules</a>
</li><li class="sidebar-item">
<a href="/api/config/storage/">QUnit.config.storage</a>
</li><li class="sidebar-item">
<a href="/api/config/urlConfig/">QUnit.config.urlConfig</a>
</li><li class="sidebar-item">
Expand Down
2 changes: 1 addition & 1 deletion api/config/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ <h2 id="qunit-config-notrycatch"><a href="/api/config/notrycatch/">QUnit.config.
<p>Disable handling of uncaught exceptions during tests.</p>

<h2 id="qunit-config-reorder"><a href="/api/config/reorder/">QUnit.config.reorder</a></h2>
<p>Allow re-running of previously failed tests out of order.</p>
<p>Prioritize re-running previously failed tests.</p>

<h2 id="qunit-config-requireexpects"><a href="/api/config/requireExpects/">QUnit.config.requireExpects</a></h2>
<p>Fail tests that don't specify how many assertions they expect.</p>
Expand Down
4 changes: 2 additions & 2 deletions api/config/module/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h1>QUnit.config.module</h1>
<p class="version-details">
version added: <a href="https://github.com/qunitjs/qunit/releases/tag/1.8.0">1.8.0</a><span class="sep">.</span></p>
<h2 id="description" class="screen-reader-text h-api-desc">Description</h2>
<p>Select a single test module to run by name.</p>
<p>Select a single test module to run by name. The module name must be a complete but case-insensitive match.</p>

<table>
<tr>
Expand All @@ -90,7 +90,7 @@ <h2 id="description" class="screen-reader-text h-api-desc">Description</h2>

<p class="note">This option can also be set by URL query parameter.</p>

<p>When specified, only a single module will be run if its name is a complete case-insensitive match. If no module name matches, then no tests will be run.</p>
<p>When specified, only the tests (and nested modules) under the selected module will run. If no module name matches, then no tests will be run.</p>

<p>This option is undefined by default, which means all loaded test modules will be run.</p>

Expand Down
2 changes: 2 additions & 0 deletions api/config/modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/config/current/">QUnit.config.current</a>
</li><li class="sidebar-item sidebar-item-active">
<a href="/api/config/modules/">QUnit.config.modules</a>
</li><li class="sidebar-item">
<a href="/api/config/storage/">QUnit.config.storage</a>
</li><li class="sidebar-item">
<a href="/api/config/urlConfig/">QUnit.config.urlConfig</a>
</li><li class="sidebar-item">
Expand Down
6 changes: 3 additions & 3 deletions api/config/reorder/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="/assets/styles.css?v=4ca9bae3" media="screen">
<link rel="alternate" type="application/rss+xml" href="/feed.xml" title="QUnit">
<title>QUnit.config.reorder | QUnit</title>
<meta property="og:title" content="QUnit.config.reorder"><meta name="description" content="Allow re-running of previously failed tests out of order."><meta property="og:description" content="Allow re-running of previously failed tests out of order."><link rel="me" href="https://fosstodon.org/@qunit"><meta name="twitter:creator" content="@qunitjs"><meta name="twitter:site" content="@qunitjs"><meta name="twitter:card" content="summary_large_image">
<meta property="og:title" content="QUnit.config.reorder"><meta name="description" content="Prioritize re-running previously failed tests."><meta property="og:description" content="Prioritize re-running previously failed tests."><link rel="me" href="https://fosstodon.org/@qunit"><meta name="twitter:creator" content="@qunitjs"><meta name="twitter:site" content="@qunitjs"><meta name="twitter:card" content="summary_large_image">
<body>
<header class="site-header" role="banner">
<div class="site-header-wrapper wrapper">
Expand Down Expand Up @@ -88,11 +88,11 @@ <h2 id="description" class="screen-reader-text h-api-desc">Description</h2>
</tr>
</table>

<p>By default, QUnit will first re-run any tests that failed on a previous run. For large test suites, this can speed up your feedback cycle by a lot.</p>
<p>By default, QUnit will prioritize re-running tests that failed on a previous run. For large test suites, this can speed up your feedback cycle by a lot.</p>

<p>Note that this feature may lead to unexpected failures if you have non-atomic tests that rely on a very specific execution order. You should consider improving such tests, but this option allows you to disable the reordering behaviour.</p>

<p>When a previously failed test is running first, the HTML Reporter displays “<em>Rerunning previously failed test</em>” in the summary whereas just “<em>Running</em>” is displayed otherwise.</p>
<p>This feature is limited to <a href="/browser/">browser environments</a> by default, as it utilizes the <code class="language-plaintext highlighter-rouge">sessionStorage</code> API. Set <a href="/api/config/storage/">QUnit.config.storage</a> to enable this feature in Node.js or in other environments.</p>

</article>
</div>
Expand Down
36 changes: 30 additions & 6 deletions api/config/storage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<article>
<header>
<h1>QUnit.config.storage</h1>
<p class="post-meta">Categories: <a class="category" href="/api/config/">QUnit.config</a>.</p>
<p class="post-meta">Categories: <a class="category" href="/api/config/">QUnit.config</a>, <a class="category" href="/api/extension/">Extension interface</a>.</p>
</header>
<p class="version-details">
version added: <a href="https://github.com/qunitjs/qunit/releases/tag/2.1.0">2.1.0</a><span class="sep">.</span></p>
Expand All @@ -84,13 +84,13 @@ <h2 id="description" class="screen-reader-text h-api-desc">Description</h2>
</tr>
<tr>
<th>default</th>
<td><code class="language-plaintext highlighter-rouge">globalThis.sessionStorage</code></td>
<td><code class="language-plaintext highlighter-rouge">globalThis.sessionStorage</code> or <code class="language-plaintext highlighter-rouge">undefined</code></td>
</tr>
</table>

<p>This is mainly for use by the HTML Reporter, where <code class="language-plaintext highlighter-rouge">sessionStorage</code> will be used if supported by the browser.</p>
<p>This is used to power the <a href="../config.md">reorder feature</a>. In <a href="/browser/">browser environments</a> this will use <code class="language-plaintext highlighter-rouge">sessionStorage</code> if supported by the browser.</p>

<p>While Node.js and other non-browser environments are not known to offer something like this by default, one can attach any preferred form of persistence by assigning an object that implements the <a href="https://html.spec.whatwg.org/multipage/webstorage.html#the-storage-interface"><code class="language-plaintext highlighter-rouge">Storage</code> interface methods</a> of the Web Storage API.</p>
<p>In Node.js and other non-browser environments, there is no storage object available for this purpose by default. You can attach your own preferred form of persistence between test runs, by assigning an object to <code class="language-plaintext highlighter-rouge">QUnit.config.storage</code> that implements <code class="language-plaintext highlighter-rouge">getItem</code>, <code class="language-plaintext highlighter-rouge">setItem</code> and <code class="language-plaintext highlighter-rouge">removeItem</code> methods, similar to the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API">Web Storage API</a>.</p>

</article>
</div>
Expand Down Expand Up @@ -155,8 +155,32 @@ <h4 class="sidebar-title-open"><a href="/api/config/">Configuration</a></h4>
<a href="/api/config/urlConfig/">QUnit.config.urlConfig</a>
</li></ul>

<h4><a href="/api/extension/">Extension interface</a></h4>

<h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a></h4>
<ul class="sidebar-list"><li class="sidebar-item">
<a href="/api/assert/pushResult/">assert.pushResult()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.assert/">QUnit.assert</a>
</li><li class="sidebar-item">
<a href="/api/config/current/">QUnit.config.current</a>
</li><li class="sidebar-item">
<a href="/api/config/modules/">QUnit.config.modules</a>
</li><li class="sidebar-item sidebar-item-active">
<a href="/api/config/storage/">QUnit.config.storage</a>
</li><li class="sidebar-item">
<a href="/api/config/urlConfig/">QUnit.config.urlConfig</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.dump.parse/">QUnit.dump.parse()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.extend/">QUnit.extend()</a>
</li><li class="sidebar-item">
<a href="/api/QUnit/hooks/">QUnit.hooks</a>
</li><li class="sidebar-item">
<a href="/api/callbacks/QUnit.on/">QUnit.on()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.onUncaughtException/">QUnit.onUncaughtException()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.stack/">QUnit.stack()</a>
</li></ul>

<h4><a href="/api/deprecated/">Deprecated methods</a></h4>

Expand Down
2 changes: 2 additions & 0 deletions api/config/urlConfig/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/config/current/">QUnit.config.current</a>
</li><li class="sidebar-item">
<a href="/api/config/modules/">QUnit.config.modules</a>
</li><li class="sidebar-item">
<a href="/api/config/storage/">QUnit.config.storage</a>
</li><li class="sidebar-item sidebar-item-active">
<a href="/api/config/urlConfig/">QUnit.config.urlConfig</a>
</li><li class="sidebar-item">
Expand Down
2 changes: 2 additions & 0 deletions api/extension/QUnit.assert/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/config/current/">QUnit.config.current</a>
</li><li class="sidebar-item">
<a href="/api/config/modules/">QUnit.config.modules</a>
</li><li class="sidebar-item">
<a href="/api/config/storage/">QUnit.config.storage</a>
</li><li class="sidebar-item">
<a href="/api/config/urlConfig/">QUnit.config.urlConfig</a>
</li><li class="sidebar-item">
Expand Down
4 changes: 3 additions & 1 deletion api/extension/QUnit.dump.parse/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h2 id="changelog">Changelog</h2>

<h2 id="examples">Examples</h2>

<p>The following is an example from <a href="https://github.com/gruntjs/grunt-contrib-qunit/blob/188a29af7817e1798fdd95f1ab7d3069231e4859/chrome/bridge.js#L42-L60">grunt-contrib-qunit</a>, which sends results from QUnit (running in Headless Chrome) to a CLI tool.</p>
<p>The following is an example from <a href="https://github.com/gruntjs/grunt-contrib-qunit/blob/v10.0.0/chrome/bridge.js#L111-L124">grunt-contrib-qunit</a>, which sends results from QUnit (running in Headless Chrome) to a CLI tool.</p>

<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">QUnit</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="nf">function </span><span class="p">(</span><span class="nx">obj</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">actual</span><span class="p">;</span>
Expand Down Expand Up @@ -190,6 +190,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/config/current/">QUnit.config.current</a>
</li><li class="sidebar-item">
<a href="/api/config/modules/">QUnit.config.modules</a>
</li><li class="sidebar-item">
<a href="/api/config/storage/">QUnit.config.storage</a>
</li><li class="sidebar-item">
<a href="/api/config/urlConfig/">QUnit.config.urlConfig</a>
</li><li class="sidebar-item sidebar-item-active">
Expand Down
2 changes: 2 additions & 0 deletions api/extension/QUnit.extend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/config/current/">QUnit.config.current</a>
</li><li class="sidebar-item">
<a href="/api/config/modules/">QUnit.config.modules</a>
</li><li class="sidebar-item">
<a href="/api/config/storage/">QUnit.config.storage</a>
</li><li class="sidebar-item">
<a href="/api/config/urlConfig/">QUnit.config.urlConfig</a>
</li><li class="sidebar-item">
Expand Down
2 changes: 2 additions & 0 deletions api/extension/QUnit.onUncaughtException/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/config/current/">QUnit.config.current</a>
</li><li class="sidebar-item">
<a href="/api/config/modules/">QUnit.config.modules</a>
</li><li class="sidebar-item">
<a href="/api/config/storage/">QUnit.config.storage</a>
</li><li class="sidebar-item">
<a href="/api/config/urlConfig/">QUnit.config.urlConfig</a>
</li><li class="sidebar-item">
Expand Down
2 changes: 2 additions & 0 deletions api/extension/QUnit.stack/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/config/current/">QUnit.config.current</a>
</li><li class="sidebar-item">
<a href="/api/config/modules/">QUnit.config.modules</a>
</li><li class="sidebar-item">
<a href="/api/config/storage/">QUnit.config.storage</a>
</li><li class="sidebar-item">
<a href="/api/config/urlConfig/">QUnit.config.urlConfig</a>
</li><li class="sidebar-item">
Expand Down
5 changes: 5 additions & 0 deletions api/extension/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ <h2 id="qunit-config-current"><a href="/api/config/current/">QUnit.config.curren
<h2 id="qunit-config-modules"><a href="/api/config/modules/">QUnit.config.modules</a></h2>
<p>List of defined test modules.</p>

<h2 id="qunit-config-storage"><a href="/api/config/storage/">QUnit.config.storage</a></h2>
<p>The Storage object to use for remembering failed tests between runs.</p>

<h2 id="qunit-config-urlconfig"><a href="/api/config/urlConfig/">QUnit.config.urlConfig</a></h2>
<p>Register additional input fields in the toolbar (HTML Reporter).</p>

Expand Down Expand Up @@ -139,6 +142,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/config/current/">QUnit.config.current</a>
</li><li class="sidebar-item">
<a href="/api/config/modules/">QUnit.config.modules</a>
</li><li class="sidebar-item">
<a href="/api/config/storage/">QUnit.config.storage</a>
</li><li class="sidebar-item">
<a href="/api/config/urlConfig/">QUnit.config.urlConfig</a>
</li><li class="sidebar-item">
Expand Down
10 changes: 9 additions & 1 deletion browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ <h2 id="fixture">Fixture</h2>

<p>Find examples and learn more at <a href="/api/config/fixture/"><code class="language-plaintext highlighter-rouge">QUnit.config.fixture</code></a>.</p>

<h2 id="efficient-development">Efficient development</h2>

<p>As your project grows, you may reach a point where the complete test suite takes more than a second or two to run. QUnit provides several automatic and optional ways to maintain a good feedback cycle.</p>

<p>QUnit’s <a href="/api/config/reorder/">reorder feature</a> automatically remembers failing tests, and prioritizes those when you reload the page, running them before all other tests. Together with “Hide passed tests” in the <a href="#html-reporter">toolbar</a>, this let’s you stay focussed by running and showing only what matters most.</p>

<p>When building out a larger feature, you can use the <a href="#module-selector">module selector</a> to re-run only the tests (and nested modules) under one or more selected module names.</p>

<h2 id="integrations">Integrations</h2>

<h3 id="linting">Linting</h3>
Expand Down Expand Up @@ -232,7 +240,7 @@ <h2 id="browser-support">Browser support</h2>
<p>For older browsers, such as Internet Explorer 6-8, Opera 12+, or Safari 5+, please use QUnit 1.x, which you can download from the <a href="https://releases.jquery.com/qunit/">release archives</a>.</p>
</div>
<aside class="sidebar" role="complementary"><div class="toc-wrapper">
<h4>Table of contents</h4><ol class="toc"><li class="sidebar-item"><a href="#getting-started">Getting started</a></li><li class="sidebar-item"><a href="#fixture">Fixture</a></li><li class="sidebar-item"><a href="#integrations">Integrations</a><ol><li class="sidebar-item"><a href="#linting">Linting</a></li><li class="sidebar-item"><a href="#browser-automation">Browser automation</a></li></ol></li><li class="sidebar-item"><a href="#url-parameters">URL parameters</a></li><li class="sidebar-item"><a href="#markup">Markup</a></li><li class="sidebar-item"><a href="#html-reporter">HTML Reporter</a><ol><li class="sidebar-item"><a href="#toolbar">Toolbar</a></li><li class="sidebar-item"><a href="#filter">Filter</a></li><li class="sidebar-item"><a href="#module-selector">Module selector</a></li><li class="sidebar-item"><a href="#test-results">Test results</a></li></ol></li><li class="sidebar-item"><a href="#browser-support">Browser support</a></li></ol></div>
<h4>Table of contents</h4><ol class="toc"><li class="sidebar-item"><a href="#getting-started">Getting started</a></li><li class="sidebar-item"><a href="#fixture">Fixture</a></li><li class="sidebar-item"><a href="#efficient-development">Efficient development</a></li><li class="sidebar-item"><a href="#integrations">Integrations</a><ol><li class="sidebar-item"><a href="#linting">Linting</a></li><li class="sidebar-item"><a href="#browser-automation">Browser automation</a></li></ol></li><li class="sidebar-item"><a href="#url-parameters">URL parameters</a></li><li class="sidebar-item"><a href="#markup">Markup</a></li><li class="sidebar-item"><a href="#html-reporter">HTML Reporter</a><ol><li class="sidebar-item"><a href="#toolbar">Toolbar</a></li><li class="sidebar-item"><a href="#filter">Filter</a></li><li class="sidebar-item"><a href="#module-selector">Module selector</a></li><li class="sidebar-item"><a href="#test-results">Test results</a></li></ol></li><li class="sidebar-item"><a href="#browser-support">Browser support</a></li></ol></div>
</aside>

</div>
Expand Down
Loading

0 comments on commit b2ec68c

Please sign in to comment.