Skip to content

Commit

Permalink
Build commit b887075
Browse files Browse the repository at this point in the history
  • Loading branch information
Krinkle committed Jul 10, 2024
1 parent 0edd029 commit 78749dd
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 6 deletions.
4 changes: 2 additions & 2 deletions api/assert/verifySteps/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ <h3 id="test-publishsubscribe-system">Test publish/subscribe system</h3>
<span class="p">});</span>
</code></pre></div></div>

<h3 id="multiple-steps-verifications-in-one-test">Multiple steps verifications in one test</h3>
<h3 id="multiple-step-verifications-in-one-test">Multiple step verifications in one test</h3>

<p>The internal buffer of observed steps is automatically reset when calling <code class="language-plaintext highlighter-rouge">verifySteps()</code>.</p>

Expand Down Expand Up @@ -295,7 +295,7 @@ <h4><a href="/api/deprecated/">Deprecated methods</a></h4>

<h4><a href="/api/removed/">Removed methods</a></h4>
<hr><div class="toc-wrapper">
<h4>Table of contents</h4><ol class="toc"><li class="sidebar-item"><a href="#description">Description</a></li><li class="sidebar-item"><a href="#examples">Examples</a><ol><li class="sidebar-item"><a href="#test-event-based-interface">Test event-based interface</a></li><li class="sidebar-item"><a href="#test-publishsubscribe-system">Test publish/subscribe system</a></li><li class="sidebar-item"><a href="#multiple-steps-verifications-in-one-test">Multiple steps verifications in one test</a></li></ol></li></ol></div>
<h4>Table of contents</h4><ol class="toc"><li class="sidebar-item"><a href="#description">Description</a></li><li class="sidebar-item"><a href="#examples">Examples</a><ol><li class="sidebar-item"><a href="#test-event-based-interface">Test event-based interface</a></li><li class="sidebar-item"><a href="#test-publishsubscribe-system">Test publish/subscribe system</a></li><li class="sidebar-item"><a href="#multiple-step-verifications-in-one-test">Multiple step verifications in one test</a></li></ol></li></ol></div>
</aside>

</div>
Expand Down
25 changes: 24 additions & 1 deletion api/callbacks/QUnit.on/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ <h2 id="the-runstart-event">The <code class="language-plaintext highlighter-roug
<span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="s2">`Test plan: </span><span class="p">${</span><span class="nx">runStart</span><span class="p">.</span><span class="nx">testCounts</span><span class="p">.</span><span class="nx">total</span><span class="p">}</span><span class="s2">`</span><span class="p">);</span>
<span class="p">});</span>
</code></pre></div></div>

<h2 id="the-suitestart-event">The <code class="language-plaintext highlighter-rouge">suiteStart</code> event</h2>

<p>The <code class="language-plaintext highlighter-rouge">suiteStart</code> event indicates the beginning of a module. It is eventually be followed by a corresponding <code class="language-plaintext highlighter-rouge">suiteEnd</code> event.</p>
Expand Down Expand Up @@ -374,6 +375,28 @@ <h2 id="the-runend-event">The <code class="language-plaintext highlighter-rouge"
<span class="p">});</span>
</code></pre></div></div>

<h2 id="the-error-event">The <code class="language-plaintext highlighter-rouge">error</code> event</h2>

<p><em>Version added: <a href="https://github.com/qunitjs/qunit/releases/tag/2.17.0">QUnit 2.17.0</a></em>.</p>

<p>The <code class="language-plaintext highlighter-rouge">error</code> event notifies plugins of uncaught global errors during a test run.</p>

<p>See also <a href="/api/extension/QUnit.onUncaughtException/">QUnit.onUncaughtException()</a> which is where you can report your own uncaught errors.</p>

<table>
<tbody>
<tr>
<td><code class="language-plaintext highlighter-rouge">Error|any</code></td>
<td><code class="language-plaintext highlighter-rouge">error</code></td>
</tr>
</tbody>
</table>

<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">on</span><span class="p">(</span><span class="dl">'</span><span class="s1">error</span><span class="dl">'</span><span class="p">,</span> <span class="nx">error</span> <span class="o">=&gt;</span> <span class="p">{</span>
<span class="nx">console</span><span class="p">.</span><span class="nf">error</span><span class="p">(</span><span class="nx">error</span><span class="p">);</span>
<span class="p">});</span>
</code></pre></div></div>

</article>
</div>
<aside class="sidebar" role="complementary">
Expand Down Expand Up @@ -441,7 +464,7 @@ <h4><a href="/api/deprecated/">Deprecated methods</a></h4>

<h4><a href="/api/removed/">Removed methods</a></h4>
<hr><div class="toc-wrapper">
<h4>Table of contents</h4><ol class="toc"><li class="sidebar-item"><a href="#description">Description</a></li><li class="sidebar-item"><a href="#the-runstart-event">The runStart event</a></li><li class="sidebar-item"><a href="#the-suitestart-event">The suiteStart event</a></li><li class="sidebar-item"><a href="#the-suiteend-event">The suiteEnd event</a></li><li class="sidebar-item"><a href="#the-teststart-event">The testStart event</a></li><li class="sidebar-item"><a href="#the-testend-event">The testEnd event</a></li><li class="sidebar-item"><a href="#the-runend-event">The runEnd event</a></li></ol></div>
<h4>Table of contents</h4><ol class="toc"><li class="sidebar-item"><a href="#description">Description</a></li><li class="sidebar-item"><a href="#the-runstart-event">The runStart event</a></li><li class="sidebar-item"><a href="#the-suitestart-event">The suiteStart event</a></li><li class="sidebar-item"><a href="#the-suiteend-event">The suiteEnd event</a></li><li class="sidebar-item"><a href="#the-teststart-event">The testStart event</a></li><li class="sidebar-item"><a href="#the-testend-event">The testEnd event</a></li><li class="sidebar-item"><a href="#the-runend-event">The runEnd event</a></li><li class="sidebar-item"><a href="#the-error-event">The error event</a></li></ol></div>
</aside>

</div>
Expand Down
2 changes: 1 addition & 1 deletion api/config/scrolltop/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h1>QUnit.config.scrolltop</h1>
<p class="version-details">
version added: <a href="https://github.com/qunitjs/qunit/releases/tag/1.14.0">1.14.0</a><span class="sep">.</span></p>
<h2 id="description" class="screen-reader-text h-api-desc">Description</h2>
<p>In browser environments, scrop to the top of the page after the tests are done.</p>
<p>In browser environments, scroll to the top of the page after the tests are done.</p>

<table>
<tr>
Expand Down
4 changes: 4 additions & 0 deletions api/extension/QUnit.onUncaughtException/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ <h2 id="description" class="screen-reader-text h-api-desc">Description</h2>
<li>QUnit CLI: <code class="language-plaintext highlighter-rouge">process.on('uncaughtException', …)</code></li>
</ul>

<p>When QUnit receives report of a global error strictly inside a test (or one of its module hooks), the exception is reported to the currently running test as extra failed assertion, and thus the test will be marked as failed. This means that uncaught exceptions (such as calling an undefined function) during <a href="/api/QUnit/test.todo/">QUnit.test.todo</a> callback count as expected failure and <strong>not</strong> fail the test run.</p>

<p>Errors received before tests (e.g. early event callbacks), internally between tests, or around the <a href="/api/callbacks/QUnit.on/#the-runend-event">runEnd event</a> (if the process is still alive for some reason), are emitted as an <a href="/api/callbacks/QUnit.on/#the-error-event">“error” event</a> to reporters.</p>

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

<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">error</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Error</span><span class="p">(</span><span class="dl">'</span><span class="s1">Failed to reverse the polarity of the neutron flow</span><span class="dl">'</span><span class="p">);</span>
Expand Down
2 changes: 1 addition & 1 deletion browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ <h3 id="test-results">Test results</h3>

<p>Click anywhere on result to expand the entry, which reveals the message of each assertion.</p>

<p>For failed assertions, the parenthical reports the failed, passed, and total number of assertions. The expanded view also displays the expected and actual asserted value, with a diff to highlight the difference between the two values.</p>
<p>For failed assertions, the parenthetical reports the failed, passed, and total number of assertions. The expanded view also displays the expected and actual asserted value, with a diff to highlight the difference between the two values.</p>

<iframe loading="lazy" title="Example failure" src="/resources/example-fail.html" style="height: 500px;"></iframe>

Expand Down
2 changes: 1 addition & 1 deletion feed.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="4.3.3">Jekyll</generator><link href="https://qunitjs.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://qunitjs.com/" rel="alternate" type="text/html" hreflang="en" /><updated>2024-07-10T21:26:46+00:00</updated><id>https://qunitjs.com/feed.xml</id><title type="html">QUnit</title><subtitle>The powerful, easy-to-use JavaScript testing framework.</subtitle></feed>
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="4.3.3">Jekyll</generator><link href="https://qunitjs.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://qunitjs.com/" rel="alternate" type="text/html" hreflang="en" /><updated>2024-07-10T23:44:34+00:00</updated><id>https://qunitjs.com/feed.xml</id><title type="html">QUnit</title><subtitle>The powerful, easy-to-use JavaScript testing framework.</subtitle></feed>

0 comments on commit 78749dd

Please sign in to comment.