Skip to content

Commit

Permalink
Build commit 0582796
Browse files Browse the repository at this point in the history
  • Loading branch information
Krinkle committed Jul 11, 2024
1 parent 78749dd commit c70addf
Show file tree
Hide file tree
Showing 19 changed files with 267 additions and 9 deletions.
2 changes: 2 additions & 0 deletions api/QUnit/hooks/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/extension/QUnit.onUncaughtException/">QUnit.onUncaughtException()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.stack/">QUnit.stack()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.urlParams/">QUnit.urlParams</a>
</li></ul>

<h4><a href="/api/deprecated/">Deprecated methods</a></h4>
Expand Down
18 changes: 17 additions & 1 deletion api/QUnit/test.if/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ <h2 id="description" class="screen-reader-text h-api-desc">Description</h2>

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

<h3 id="skip-a-test">Skip a test</h3>

<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">module</span><span class="p">(</span><span class="dl">'</span><span class="s1">MyApp</span><span class="dl">'</span><span class="p">);</span>

<span class="c1">// Skip if executed without a DOM</span>
Expand All @@ -118,6 +120,20 @@ <h2 id="examples">Examples</h2>
<span class="p">});</span>
</code></pre></div></div>

<p>This is equivalent to:</p>

<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// Skip if executed without a DOM</span>
<span class="k">if </span><span class="p">(</span><span class="k">typeof</span> <span class="nb">document</span> <span class="o">!==</span> <span class="dl">'</span><span class="s1">undefined</span><span class="dl">'</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">QUnit</span><span class="p">.</span><span class="nf">test</span><span class="p">(</span><span class="dl">'</span><span class="s1">render</span><span class="dl">'</span><span class="p">,</span> <span class="nf">function </span><span class="p">(</span><span class="nx">assert</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">assert</span><span class="p">.</span><span class="nf">strictEqual</span><span class="p">(</span><span class="nx">MyApp</span><span class="p">.</span><span class="nf">render</span><span class="p">(),</span> <span class="dl">'</span><span class="s1">&lt;p&gt;Hello world!&lt;/p&gt;</span><span class="dl">'</span><span class="p">);</span>
<span class="p">});</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="nx">QUnit</span><span class="p">.</span><span class="nx">test</span><span class="p">.</span><span class="nf">skip</span><span class="p">(</span><span class="dl">'</span><span class="s1">render</span><span class="dl">'</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div></div>

<h3 id="conditional-module">Conditional module</h3>

<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">QUnit</span><span class="p">.</span><span class="nx">module</span><span class="p">.</span><span class="k">if</span><span class="p">(</span><span class="dl">'</span><span class="s1">MyApp</span><span class="dl">'</span><span class="p">,</span> <span class="k">typeof</span> <span class="nb">document</span> <span class="o">!==</span> <span class="dl">'</span><span class="s1">undefined</span><span class="dl">'</span><span class="p">);</span>

<span class="nx">QUnit</span><span class="p">.</span><span class="nf">test</span><span class="p">(</span><span class="dl">'</span><span class="s1">render</span><span class="dl">'</span><span class="p">,</span> <span class="nf">function </span><span class="p">(</span><span class="nx">assert</span><span class="p">)</span> <span class="p">{</span>
Expand Down Expand Up @@ -168,7 +184,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></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="#skip-a-test">Skip a test</a></li><li class="sidebar-item"><a href="#conditional-module">Conditional module</a></li></ol></li></ol></div>
</aside>

</div>
Expand Down
13 changes: 9 additions & 4 deletions api/QUnit/test.skip/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ <h1>QUnit.test.skip()</h1>
<p class="version-details">
version added: <a href="https://github.com/qunitjs/qunit/releases/tag/1.16.0">1.16.0</a><span class="sep">.</span></p>
<h2 id="description" class="screen-reader-text h-api-desc">Description</h2>
<p><code class="language-plaintext highlighter-rouge">QUnit.test.skip( name, callback )</code><br />
<p><code class="language-plaintext highlighter-rouge">QUnit.test.skip( name )</code><br />
<code class="language-plaintext highlighter-rouge">QUnit.test.skip( name, callback )</code><br />
<code class="language-plaintext highlighter-rouge">QUnit.skip( name )</code><br />
<code class="language-plaintext highlighter-rouge">QUnit.skip( name, callback )</code></p>

<p>Add a test that will be skipped during the run.</p>
Expand All @@ -90,11 +92,11 @@ <h2 id="description" class="screen-reader-text h-api-desc">Description</h2>
<tbody>
<tr>
<td><code class="language-plaintext highlighter-rouge">name</code> (string)</td>
<td>Title of unit being tested</td>
<td>Title of unit</td>
</tr>
<tr>
<td><code class="language-plaintext highlighter-rouge">callback</code> (function)</td>
<td>Function that performs the test</td>
<td>Optional, function that would perform the test</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -128,7 +130,7 @@ <h2 id="changelog">Changelog</h2>

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

<p>How to use <code class="language-plaintext highlighter-rouge">skip</code> as a placeholder for future or temporarily broken tests.</p>
<p>How to use <code class="language-plaintext highlighter-rouge">skip</code> as a placeholder for future tests, or to temporarily skip a broken test.</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">module</span><span class="p">(</span><span class="dl">'</span><span class="s1">robot</span><span class="dl">'</span><span class="p">,</span> <span class="nx">hooks</span> <span class="o">=&gt;</span> <span class="p">{</span>
<span class="kd">let</span> <span class="nx">robot</span><span class="p">;</span>
Expand All @@ -144,6 +146,9 @@ <h2 id="examples">Examples</h2>
<span class="nx">QUnit</span><span class="p">.</span><span class="nx">test</span><span class="p">.</span><span class="nf">skip</span><span class="p">(</span><span class="dl">'</span><span class="s1">laser</span><span class="dl">'</span><span class="p">,</span> <span class="nx">assert</span> <span class="o">=&gt;</span> <span class="p">{</span>
<span class="nx">assert</span><span class="p">.</span><span class="nf">true</span><span class="p">(</span><span class="nx">robot</span><span class="p">.</span><span class="nf">laser</span><span class="p">());</span>
<span class="p">});</span>

<span class="c1">// TODO: Implement this later!</span>
<span class="nx">QUnit</span><span class="p">.</span><span class="nx">test</span><span class="p">.</span><span class="nf">skip</span><span class="p">(</span><span class="dl">'</span><span class="s1">jump</span><span class="dl">'</span><span class="p">);</span>
<span class="p">});</span>
</code></pre></div></div>

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 @@ -280,6 +280,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/extension/QUnit.onUncaughtException/">QUnit.onUncaughtException()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.stack/">QUnit.stack()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.urlParams/">QUnit.urlParams</a>
</li></ul>

<h4><a href="/api/deprecated/">Deprecated methods</a></h4>
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 @@ -457,6 +457,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/extension/QUnit.onUncaughtException/">QUnit.onUncaughtException()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.stack/">QUnit.stack()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.urlParams/">QUnit.urlParams</a>
</li></ul>

<h4><a href="/api/deprecated/">Deprecated methods</a></h4>
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 @@ -223,6 +223,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/extension/QUnit.onUncaughtException/">QUnit.onUncaughtException()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.stack/">QUnit.stack()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.urlParams/">QUnit.urlParams</a>
</li></ul>

<h4><a href="/api/deprecated/">Deprecated methods</a></h4>
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 @@ -208,6 +208,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/extension/QUnit.onUncaughtException/">QUnit.onUncaughtException()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.stack/">QUnit.stack()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.urlParams/">QUnit.urlParams</a>
</li></ul>

<h4><a href="/api/deprecated/">Deprecated methods</a></h4>
Expand Down
2 changes: 2 additions & 0 deletions api/config/storage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/extension/QUnit.onUncaughtException/">QUnit.onUncaughtException()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.stack/">QUnit.stack()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.urlParams/">QUnit.urlParams</a>
</li></ul>

<h4><a href="/api/deprecated/">Deprecated methods</a></h4>
Expand Down
6 changes: 4 additions & 2 deletions api/config/urlConfig/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h2 id="description" class="screen-reader-text h-api-desc">Description</h2>
</code></pre></div></div>

<ul>
<li>The <code class="language-plaintext highlighter-rouge">id</code> property is used as URL query parameter name, and corresponding key under <code class="language-plaintext highlighter-rouge">QUnit.urlParams</code>.</li>
<li>The <code class="language-plaintext highlighter-rouge">id</code> property is used as URL query parameter name, and corresponding key under <a href="/api/extension/QUnit.urlParams/"><code class="language-plaintext highlighter-rouge">QUnit.urlParams</code></a>.</li>
<li>The <code class="language-plaintext highlighter-rouge">label</code> property is used as text for the HTML label element in the user interface.</li>
<li>The optional <code class="language-plaintext highlighter-rouge">tooltip</code> property is used as the <code class="language-plaintext highlighter-rouge">title</code> attribute and should explain what you code will do with this option.</li>
</ul>
Expand All @@ -114,7 +114,7 @@ <h2 id="description" class="screen-reader-text h-api-desc">Description</h2>

<p>If <code class="language-plaintext highlighter-rouge">value</code> is an array, the item will render as a “select one” dropdown menu with an empty value as first default option, followed by one option for each item in the array. The corresponding URL parameter will be absent when the empty option is selected, and otherwise will be set to the value of the selected array item.</p>

<p>If <code class="language-plaintext highlighter-rouge">value</code> is an object, the item will render as a dropdown menu. The URL parameter will be set to the key of the selected property, and this will also be available via <code class="language-plaintext highlighter-rouge">QUnit.urlParams[id]</code>. The object values will be used as display label for each option in the dropdown menu. The corresponding URL parameter will be absent when the empty option is selected.</p>
<p>If <code class="language-plaintext highlighter-rouge">value</code> is an object, the item will render as a dropdown menu. The URL parameter will be set to the key of the selected property, and this will also be available via <a href="/api/extension/QUnit.urlParams/"><code class="language-plaintext highlighter-rouge">QUnit.urlParams[id]</code></a>. The object values will be used as display label for each option in the dropdown menu. The corresponding URL parameter will be absent when the empty option is selected.</p>

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

Expand Down Expand Up @@ -241,6 +241,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/extension/QUnit.onUncaughtException/">QUnit.onUncaughtException()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.stack/">QUnit.stack()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.urlParams/">QUnit.urlParams</a>
</li></ul>

<h4><a href="/api/deprecated/">Deprecated methods</a></h4>
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 @@ -125,6 +125,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/extension/QUnit.onUncaughtException/">QUnit.onUncaughtException()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.stack/">QUnit.stack()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.urlParams/">QUnit.urlParams</a>
</li></ul>

<h4><a href="/api/deprecated/">Deprecated methods</a></h4>
Expand Down
2 changes: 2 additions & 0 deletions api/extension/QUnit.dump.parse/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/extension/QUnit.onUncaughtException/">QUnit.onUncaughtException()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.stack/">QUnit.stack()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.urlParams/">QUnit.urlParams</a>
</li></ul>

<h4><a href="/api/deprecated/">Deprecated methods</a></h4>
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 @@ -186,6 +186,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/extension/QUnit.onUncaughtException/">QUnit.onUncaughtException()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.stack/">QUnit.stack()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.urlParams/">QUnit.urlParams</a>
</li></ul>

<h4><a href="/api/deprecated/">Deprecated methods</a></h4>
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 @@ -167,6 +167,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/extension/QUnit.onUncaughtException/">QUnit.onUncaughtException()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.stack/">QUnit.stack()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.urlParams/">QUnit.urlParams</a>
</li></ul>

<h4><a href="/api/deprecated/">Deprecated methods</a></h4>
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 @@ -178,6 +178,8 @@ <h4 class="sidebar-title-open"><a href="/api/extension/">Extension interface</a>
<a href="/api/extension/QUnit.onUncaughtException/">QUnit.onUncaughtException()</a>
</li><li class="sidebar-item sidebar-item-active">
<a href="/api/extension/QUnit.stack/">QUnit.stack()</a>
</li><li class="sidebar-item">
<a href="/api/extension/QUnit.urlParams/">QUnit.urlParams</a>
</li></ul>

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

0 comments on commit c70addf

Please sign in to comment.