Skip to content

Commit

Permalink
Deploy website
Browse files Browse the repository at this point in the history
Deploy website version based on 9099c11
  • Loading branch information
Docusaurus bot committed Oct 10, 2024
1 parent 0382bc9 commit 7671dd0
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/fixtures.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h2><a class="anchor" aria-hidden="true" id="functional-test-local-fixtures"></a
<p>Use <code>FunFixture.map2</code> to compose multiple fixtures into a single fixture.</p>
<pre><code class="hljs css language-scala"><span class="hljs-comment">// Fixture with access to two temporary files.</span>
<span class="hljs-keyword">val</span> files2 = <span class="hljs-type">FunFixture</span>.map2(files, files)
<span class="hljs-comment">// files2: FunFixture[(Path, Path)] = munit.FunFixtures$FunFixture@2ed92d81</span>
<span class="hljs-comment">// files2: FunFixture[(Path, Path)] = munit.FunFixtures$FunFixture@49f1677e</span>
files2.test(<span class="hljs-string">"two"</span>) {
<span class="hljs-keyword">case</span> (file1, file2) =&gt;
assertNotEquals(file1, file2)
Expand Down
11 changes: 6 additions & 5 deletions docs/getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,14 @@ <h3><a class="anchor" aria-hidden="true" id="search-for-failed-tests-in-ci-logs"
in a large log file.</p>
<table>
<thead>
<tr><th>Test</th><th>Prefix</th></tr>
<tr><th>Test</th><th>Prefix</th><th>Comment</th><th>See Also</th></tr>
</thead>
<tbody>
<tr><td>Success</td><td><code>+</code></td></tr>
<tr><td>Failed</td><td><code>==&gt; X</code></td></tr>
<tr><td>Ignored</td><td><code>==&gt; i</code></td></tr>
<tr><td>Skipped</td><td><code>==&gt; s</code></td></tr>
<tr><td>Success</td><td><code>+</code></td><td></td><td></td></tr>
<tr><td>Failed</td><td><code>==&gt; X</code></td><td></td><td><a href="assertions.html">Writing assertions</a></td></tr>
<tr><td>Ignored</td><td><code>==&gt; i</code></td><td><code>ignored</code></td><td><a href="filtering.html">Filtering tests</a></td></tr>
<tr><td>Pending</td><td><code>==&gt; i</code></td><td><code>PENDING</code></td><td><a href="tests.html">Declaring tests</a></td></tr>
<tr><td>Skipped</td><td><code>==&gt; s</code></td><td></td><td><a href="filtering.html">Filtering tests</a></td></tr>
</tbody>
</table>
<p>Knowing these prefixes may come in handy for example when browsing test logs in
Expand Down
5 changes: 5 additions & 0 deletions docs/scalatest.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ <h2><a class="anchor" aria-hidden="true" id="converting-suite-structure"></a><a
<span class="hljs-addition">+ test("ignored".ignore) {</span>
// unchanged
}

<span class="hljs-deletion">- test("pending") (pending)</span>
<span class="hljs-addition">+ test("pending".pending) {</span>
<span class="hljs-addition">+ // zero or more assertions</span>
<span class="hljs-addition">+ }</span>
</code></pre>
<p>If you are coming from <code>WordSpec</code> style tests, make sure to flatten them, or your tests
will not run: Only the outer test will be selected to run, and the inner tests will do
Expand Down
43 changes: 42 additions & 1 deletion docs/tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,47 @@ <h2><a class="anchor" aria-hidden="true" id="customize-test-name-based-on-a-dyna
+ munit.<span class="hljs-type">ScalaVersionFrameworkSuite</span>.foo<span class="hljs-number">-2.12</span><span class="hljs-number">.10</span>
+ munit.<span class="hljs-type">ScalaVersionFrameworkSuite</span>.foo<span class="hljs-number">-2.13</span><span class="hljs-number">.1</span>
</code></pre>
<h2><a class="anchor" aria-hidden="true" id="tag-pending-tests"></a><a href="#tag-pending-tests" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Tag pending tests</h2>
<p>Use <code>.pending</code> to annotate a work-in-progress test case with known-incomplete coverage.
Any assertions in the pending case must pass, but will be reported as Ignored instead of Success.
Any failures will be reported as Failures (this differs from <code>.ignore</code> which skips the test case entirely).
This tag is useful for documenting:</p>
<ul>
<li><strong>Empty placeholders</strong> that lack any assertions (unless tagged pending, these are reported as success).</li>
<li><strong>Incomplete placeholders</strong> with too few assertions (unless tagged pending, these are reported as success).</li>
<li><strong>Accurate placeholders</strong> whose stable assertions must pass (regressions are not ignored).</li>
<li><strong>Searchability</strong> of your codebase for known-incomplete test cases.</li>
<li><strong>Cross-references</strong> between your codebase and issue trackers.</li>
</ul>
<p>You can (optionally) include a comment for your pending test case, such as a job ticket ID:</p>
<pre><code class="hljs css language-scala"> <span class="hljs-comment">// Empty placeholder, without logged comments:</span>
test(<span class="hljs-string">"time travel"</span>.pending) {
<span class="hljs-comment">// Test case to be written yesterday</span>
}

<span class="hljs-comment">// Empty placeholder, with logged comments:</span>
test(<span class="hljs-string">"time travel"</span>.pending(<span class="hljs-string">"requirements from product owner"</span>)) {
<span class="hljs-comment">// Is this funded yet??</span>
}

<span class="hljs-comment">// Empty placeholder, tracked for action:</span>
test(<span class="hljs-string">"time travel"</span>.pending(<span class="hljs-string">"INTERN-101"</span>)) {
<span class="hljs-comment">// Test case to be written by an intern</span>
}

<span class="hljs-comment">// Incomplete (WIP) placeholder, tracked for action:</span>
test(<span class="hljs-string">"time travel"</span>.pending(<span class="hljs-string">"QA-404"</span>)) {
assert(<span class="hljs-type">LocalDate</span>.now.isAfter(yesterday))
<span class="hljs-comment">// QA team to provide specific examples for regression-test coverage</span>
}
</code></pre>
<p>If you want to mark a failed regression test as pending-until-fixed,
you combine <code>.ignore</code> before or after <code>.pending</code>, for example:</p>
<pre><code class="hljs css language-scala"> test(<span class="hljs-string">"this test worked yesterday"</span>.ignore.pending(<span class="hljs-string">"platform investigation"</span>)) {
assert(<span class="hljs-type">LocalDate</span>.now.equals(yesterday))
}
</code></pre>
<p>This allows pending comments, reasons, or cross-references to be logged for ignored tests.</p>
<h2><a class="anchor" aria-hidden="true" id="tag-flaky-tests"></a><a href="#tag-flaky-tests" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Tag flaky tests</h2>
<p>Use <code>.flaky</code> to mark a test case that has a tendency to non-deterministically
fail for known or unknown reasons.</p>
Expand Down Expand Up @@ -372,7 +413,7 @@ <h2><a class="anchor" aria-hidden="true" id="share-configuration-between-test-su
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MyFirstSuite</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">BaseSuite</span> </span>{ <span class="hljs-comment">/* ... */</span> }
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MySecondSuite</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">BaseSuite</span> </span>{ <span class="hljs-comment">/* ... */</span> }
</code></pre>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/munit/docs/getting-started.html"><span class="arrow-prev"></span><span>Getting started</span></a><a class="docs-next button" href="/munit/docs/assertions.html"><span>Writing assertions</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#declare-basic-test">Declare basic test</a></li><li><a href="#declare-async-test">Declare async test</a></li><li><a href="#customize-test-timeouts">Customize test timeouts</a></li><li><a href="#customize-value-printers">Customize value printers</a></li><li><a href="#run-tests-in-parallel">Run tests in parallel</a></li><li><a href="#declare-tests-inside-a-helper-function">Declare tests inside a helper function</a></li><li><a href="#declare-test-that-should-always-fail">Declare test that should always fail</a></li><li><a href="#customize-evaluation-of-tests-with-tags">Customize evaluation of tests with tags</a></li><li><a href="#customize-test-name-based-on-a-dynamic-condition">Customize test name based on a dynamic condition</a></li><li><a href="#tag-flaky-tests">Tag flaky tests</a></li><li><a href="#run-logic-before-and-after-tests">Run logic before and after tests</a></li><li><a href="#share-configuration-between-test-suites">Share configuration between test suites</a></li></ul></nav></div><footer class="nav-footer" id="footer" style="background-color:#045C4D"><section class="sitemap"><a href="/munit/" class="nav-home"><img src="/munit/img/scalameta-logo.png" alt="MUnit" width="66" height="58"/></a><div><h5>Overview</h5><a href="/munit/docs/getting-started.html">Getting started</a></div><div><h5>Social</h5><a href="https://github.com/scalameta/munit" target="_blank"><img src="https://img.shields.io/github/stars/scalameta/munit.svg?color=%23087e8b&amp;label=stars&amp;logo=github&amp;style=social"/></a><a href="https://discord.gg/RFpSVth" target="_blank"><img src="https://img.shields.io/discord/632642981228314653?logo=discord&amp;style=social"/></a><a href="https://gitter.im/scalameta/munit" target="_blank"><img src="https://img.shields.io/gitter/room/scalameta/munit.svg?logo=gitter&amp;style=social"/></a><a href="https://twitter.com/scalameta" target="_blank"><img src="https://img.shields.io/twitter/follow/scalameta.svg?logo=twitter&amp;style=social"/></a></div></section><section class="copyright">Copyright © 2024 Scalameta</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/munit/docs/getting-started.html"><span class="arrow-prev"></span><span>Getting started</span></a><a class="docs-next button" href="/munit/docs/assertions.html"><span>Writing assertions</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#declare-basic-test">Declare basic test</a></li><li><a href="#declare-async-test">Declare async test</a></li><li><a href="#customize-test-timeouts">Customize test timeouts</a></li><li><a href="#customize-value-printers">Customize value printers</a></li><li><a href="#run-tests-in-parallel">Run tests in parallel</a></li><li><a href="#declare-tests-inside-a-helper-function">Declare tests inside a helper function</a></li><li><a href="#declare-test-that-should-always-fail">Declare test that should always fail</a></li><li><a href="#customize-evaluation-of-tests-with-tags">Customize evaluation of tests with tags</a></li><li><a href="#customize-test-name-based-on-a-dynamic-condition">Customize test name based on a dynamic condition</a></li><li><a href="#tag-pending-tests">Tag pending tests</a></li><li><a href="#tag-flaky-tests">Tag flaky tests</a></li><li><a href="#run-logic-before-and-after-tests">Run logic before and after tests</a></li><li><a href="#share-configuration-between-test-suites">Share configuration between test suites</a></li></ul></nav></div><footer class="nav-footer" id="footer" style="background-color:#045C4D"><section class="sitemap"><a href="/munit/" class="nav-home"><img src="/munit/img/scalameta-logo.png" alt="MUnit" width="66" height="58"/></a><div><h5>Overview</h5><a href="/munit/docs/getting-started.html">Getting started</a></div><div><h5>Social</h5><a href="https://github.com/scalameta/munit" target="_blank"><img src="https://img.shields.io/github/stars/scalameta/munit.svg?color=%23087e8b&amp;label=stars&amp;logo=github&amp;style=social"/></a><a href="https://discord.gg/RFpSVth" target="_blank"><img src="https://img.shields.io/discord/632642981228314653?logo=discord&amp;style=social"/></a><a href="https://gitter.im/scalameta/munit" target="_blank"><img src="https://img.shields.io/gitter/room/scalameta/munit.svg?logo=gitter&amp;style=social"/></a><a href="https://twitter.com/scalameta" target="_blank"><img src="https://img.shields.io/twitter/follow/scalameta.svg?logo=twitter&amp;style=social"/></a></div></section><section class="copyright">Copyright © 2024 Scalameta</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>
document.addEventListener('keyup', function(e) {
if (e.target !== document.body) {
return;
Expand Down

0 comments on commit 7671dd0

Please sign in to comment.