-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8a825a3
Showing
31 changed files
with
5,329 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
div.terminal { | ||
color: white; | ||
background-color: black; | ||
} | ||
|
||
div.terminal pre { | ||
background-color: black; | ||
color: white; | ||
padding: 20px; | ||
overflow: auto | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta name="generator" content="Typelevel Laika + Helium Theme" /> | ||
<title>IDE Support?</title> | ||
|
||
<meta name="author" content="Olivier Mélois"/> | ||
|
||
<meta name="author" content="Anton Sviridov"/> | ||
|
||
<meta name="author" content="Andrew Valencik"/> | ||
|
||
|
||
<meta name="description" content="Weaver documentation"/> | ||
|
||
|
||
|
||
<link rel="icon" sizes="32x32" type="image/png" href="https://typelevel.org/img/favicon.png"/> | ||
|
||
|
||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700"> | ||
|
||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Mono:500"> | ||
|
||
<link rel="stylesheet" type="text/css" href="../helium/site/icofont.min.css" /> | ||
<link rel="stylesheet" type="text/css" href="../helium/site/laika-helium.css" /> | ||
<link rel="stylesheet" type="text/css" href="../assets/custom.css" /> | ||
<script src="../helium/site/laika-helium.js"></script> | ||
|
||
|
||
<script> /* for avoiding page load transitions */ </script> | ||
</head> | ||
|
||
<body> | ||
|
||
<header id="top-bar" class="light-default dark-default"> | ||
|
||
<div class="row"> | ||
<a id="nav-icon"> | ||
<i class="icofont-laika navigationMenu" title="Navigation"></i> | ||
</a> | ||
|
||
|
||
</div> | ||
|
||
<a class="image-link" href="https://typelevel.org"><img src="https://typelevel.org/img/logo.svg"></a> | ||
|
||
<div class="row links"> | ||
|
||
<a class="icon-link svg-link" href="https://github.com/typelevel/weaver-test"><span class="github" title="Source Code"><svg class="svg-icon" width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"> | ||
<g class="svg-shape"> | ||
<path d="M49.995,1c-27.609,-0 -49.995,22.386 -49.995,50.002c-0,22.09 14.325,40.83 34.194,47.444c2.501,0.458 3.413,-1.086 3.413,-2.412c0,-1.185 -0.043,-4.331 -0.067,-8.503c-13.908,3.021 -16.843,-6.704 -16.843,-6.704c-2.274,-5.773 -5.552,-7.311 -5.552,-7.311c-4.54,-3.103 0.344,-3.042 0.344,-3.042c5.018,0.356 7.658,5.154 7.658,5.154c4.46,7.64 11.704,5.433 14.552,4.156c0.454,-3.232 1.744,-5.436 3.174,-6.685c-11.102,-1.262 -22.775,-5.553 -22.775,-24.713c-0,-5.457 1.949,-9.92 5.147,-13.416c-0.516,-1.265 -2.231,-6.348 0.488,-13.233c0,0 4.199,-1.344 13.751,5.126c3.988,-1.108 8.266,-1.663 12.518,-1.682c4.245,0.019 8.523,0.574 12.517,1.682c9.546,-6.47 13.736,-5.126 13.736,-5.126c2.728,6.885 1.013,11.968 0.497,13.233c3.204,3.496 5.141,7.959 5.141,13.416c0,19.209 -11.691,23.436 -22.83,24.673c1.795,1.544 3.394,4.595 3.394,9.26c0,6.682 -0.061,12.076 -0.061,13.715c0,1.338 0.899,2.894 3.438,2.406c19.853,-6.627 34.166,-25.354 34.166,-47.438c-0,-27.616 -22.389,-50.002 -50.005,-50.002"/> | ||
</g> | ||
</svg></span></a> | ||
|
||
<a class="icon-link glyph-link" href="https://discord.gg/XF3CXcMzqD"><i class="icofont-laika chat" title="Chat"></i></a> | ||
|
||
<a class="icon-link svg-link" href="https://fosstodon.org/@typelevel"><span class="mastodon" title="Mastodon"><svg class="svg-icon" width="100%" height="100%" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg"> | ||
<g class="svg-shape"> | ||
<path d="M11.19 12.195c2.016-.24 3.77-1.475 3.99-2.603.348-1.778.32-4.339.32-4.339 0-3.47-2.286-4.488-2.286-4.488C12.062.238 10.083.017 8.027 0h-.05C5.92.017 3.942.238 2.79.765c0 0-2.285 1.017-2.285 4.488l-.002.662c-.004.64-.007 1.35.011 2.091.083 3.394.626 6.74 3.78 7.57 1.454.383 2.703.463 3.709.408 1.823-.1 2.847-.647 2.847-.647l-.06-1.317s-1.303.41-2.767.36c-1.45-.05-2.98-.156-3.215-1.928a3.614 3.614 0 0 1-.033-.496s1.424.346 3.228.428c1.103.05 2.137-.064 3.188-.189zm1.613-2.47H11.13v-4.08c0-.859-.364-1.295-1.091-1.295-.804 0-1.207.517-1.207 1.541v2.233H7.168V5.89c0-1.024-.403-1.541-1.207-1.541-.727 0-1.091.436-1.091 1.296v4.079H3.197V5.522c0-.859.22-1.541.66-2.046.456-.505 1.052-.764 1.793-.764.856 0 1.504.328 1.933.983L8 4.39l.417-.695c.429-.655 1.077-.983 1.934-.983.74 0 1.336.259 1.791.764.442.505.661 1.187.661 2.046v4.203z"/> | ||
</g> | ||
</svg></span></a> | ||
|
||
</div> | ||
|
||
</header> | ||
|
||
<nav id="sidebar"> | ||
|
||
<div class="row"> | ||
|
||
<a class="icon-link svg-link" href="https://github.com/typelevel/weaver-test"><span class="github" title="Source Code"><svg class="svg-icon" width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"> | ||
<g class="svg-shape"> | ||
<path d="M49.995,1c-27.609,-0 -49.995,22.386 -49.995,50.002c-0,22.09 14.325,40.83 34.194,47.444c2.501,0.458 3.413,-1.086 3.413,-2.412c0,-1.185 -0.043,-4.331 -0.067,-8.503c-13.908,3.021 -16.843,-6.704 -16.843,-6.704c-2.274,-5.773 -5.552,-7.311 -5.552,-7.311c-4.54,-3.103 0.344,-3.042 0.344,-3.042c5.018,0.356 7.658,5.154 7.658,5.154c4.46,7.64 11.704,5.433 14.552,4.156c0.454,-3.232 1.744,-5.436 3.174,-6.685c-11.102,-1.262 -22.775,-5.553 -22.775,-24.713c-0,-5.457 1.949,-9.92 5.147,-13.416c-0.516,-1.265 -2.231,-6.348 0.488,-13.233c0,0 4.199,-1.344 13.751,5.126c3.988,-1.108 8.266,-1.663 12.518,-1.682c4.245,0.019 8.523,0.574 12.517,1.682c9.546,-6.47 13.736,-5.126 13.736,-5.126c2.728,6.885 1.013,11.968 0.497,13.233c3.204,3.496 5.141,7.959 5.141,13.416c0,19.209 -11.691,23.436 -22.83,24.673c1.795,1.544 3.394,4.595 3.394,9.26c0,6.682 -0.061,12.076 -0.061,13.715c0,1.338 0.899,2.894 3.438,2.406c19.853,-6.627 34.166,-25.354 34.166,-47.438c-0,-27.616 -22.389,-50.002 -50.005,-50.002"/> | ||
</g> | ||
</svg></span></a> | ||
|
||
<a class="icon-link glyph-link" href="https://discord.gg/XF3CXcMzqD"><i class="icofont-laika chat" title="Chat"></i></a> | ||
|
||
<a class="icon-link svg-link" href="https://fosstodon.org/@typelevel"><span class="mastodon" title="Mastodon"><svg class="svg-icon" width="100%" height="100%" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg"> | ||
<g class="svg-shape"> | ||
<path d="M11.19 12.195c2.016-.24 3.77-1.475 3.99-2.603.348-1.778.32-4.339.32-4.339 0-3.47-2.286-4.488-2.286-4.488C12.062.238 10.083.017 8.027 0h-.05C5.92.017 3.942.238 2.79.765c0 0-2.285 1.017-2.285 4.488l-.002.662c-.004.64-.007 1.35.011 2.091.083 3.394.626 6.74 3.78 7.57 1.454.383 2.703.463 3.709.408 1.823-.1 2.847-.647 2.847-.647l-.06-1.317s-1.303.41-2.767.36c-1.45-.05-2.98-.156-3.215-1.928a3.614 3.614 0 0 1-.033-.496s1.424.346 3.228.428c1.103.05 2.137-.064 3.188-.189zm1.613-2.47H11.13v-4.08c0-.859-.364-1.295-1.091-1.295-.804 0-1.207.517-1.207 1.541v2.233H7.168V5.89c0-1.024-.403-1.541-1.207-1.541-.727 0-1.091.436-1.091 1.296v4.079H3.197V5.522c0-.859.22-1.541.66-2.046.456-.505 1.052-.764 1.793-.764.856 0 1.504.328 1.933.983L8 4.39l.417-.695c.429-.655 1.077-.983 1.934-.983.74 0 1.336.259 1.791.764.442.505.661 1.187.661 2.046v4.203z"/> | ||
</g> | ||
</svg></span></a> | ||
|
||
</div> | ||
|
||
<ul class="nav-list"> | ||
<li class="level1 nav-header">Overview</li> | ||
<li class="level2 nav-leaf"><a href="../overview/installation.html">Installation</a></li> | ||
<li class="level2 nav-leaf"><a href="../overview/motivation.html">Motivation</a></li> | ||
<li class="level1 nav-header">Features</li> | ||
<li class="level2 nav-leaf"><a href="../features/expectations.html">Expectations (assertions)</a></li> | ||
<li class="level2 nav-leaf"><a href="../features/tracing_failures.html">Tracing Failures</a></li> | ||
<li class="level2 nav-leaf"><a href="../features/resources.html">Sharing resources</a></li> | ||
<li class="level2 nav-leaf"><a href="../features/global_resources.html">Sharing resources across suites</a></li> | ||
<li class="level2 nav-leaf"><a href="../features/logging.html">Logging information</a></li> | ||
<li class="level2 nav-leaf"><a href="../features/tagging.html">Tagging</a></li> | ||
<li class="level2 nav-leaf"><a href="../features/scalacheck.html">ScalaCheck integration</a></li> | ||
<li class="level2 nav-leaf"><a href="../features/discipline.html">Discipline integration</a></li> | ||
<li class="level2 nav-leaf"><a href="../features/parallelism.html">Configuring parallelism</a></li> | ||
<li class="level2 nav-leaf"><a href="../features/funsuite.html">Pure tests</a></li> | ||
<li class="level2 nav-leaf"><a href="../features/filtering.html">Filtering tests</a></li> | ||
<li class="level2 nav-leaf"><a href="../features/specs2.html">specs2 (discontinued)</a></li> | ||
<li class="level1 nav-header">Sample reports</li> | ||
<li class="level2 nav-leaf"><a href="../samples/multiple_suites_success.html">Successes</a></li> | ||
<li class="level2 nav-leaf"><a href="../samples/multiple_suites_failures.html">Failures</a></li> | ||
<li class="level2 nav-leaf"><a href="../samples/multiple_suites_logging.html">Logging</a></li> | ||
<li class="level1 nav-header">Frequently Asked Questions</li> | ||
<li class="level2 active nav-leaf"><a href="#">IDE Support?</a></li> | ||
<li class="level2 nav-leaf"><a href="other_effects.html">What happened to ZIO / Monix / MonixBIO ?</a></li> | ||
</ul> | ||
|
||
</nav> | ||
|
||
<div id="container"> | ||
|
||
|
||
<nav id="page-nav"> | ||
<p class="header"><a href="#">IDE Support?</a></p> | ||
|
||
<ul class="nav-list"> | ||
<li class="level1 nav-leaf"><a href="#how-do-i-get-weaver-working-with-intellij-vscode-neovim">How do I get weaver working with IntelliJ / vscode / neovim?</a></li> | ||
<li class="level1 nav-leaf"><a href="#how-do-i-ignore-individual-tests">How do I ignore individual tests?</a></li> | ||
<li class="level1 nav-node"><a href="#how-do-i-run-just-one-test-in-a-suite">How do I run just one test in a suite?</a></li> | ||
<li class="level2 nav-leaf"><a href="#regarding-inaccurate-test-duration-when-using-intellij">Regarding inaccurate test duration when using IntelliJ</a></li> | ||
</ul> | ||
|
||
<p class="footer"></p> | ||
</nav> | ||
|
||
|
||
<main class="content"> | ||
|
||
<h1 id="ide-support" class="title">IDE Support?</h1> | ||
|
||
<h2 id="how-do-i-get-weaver-working-with-intellij-vscode-neovim" class="section"><a class="anchor-link left" href="#how-do-i-get-weaver-working-with-intellij-vscode-neovim"><i class="icofont-laika link"></i></a>How do I get weaver working with IntelliJ / vscode / neovim?</h2> | ||
<p>Weaver provides a JUnit runner that IDEs pick up automatically. On IntelliJ the suite should have the normal button to run the tests, and Metals should provide a code lens.</p> | ||
|
||
<h2 id="how-do-i-ignore-individual-tests" class="section"><a class="anchor-link left" href="#how-do-i-ignore-individual-tests"><i class="icofont-laika link"></i></a>How do I ignore individual tests?</h2> | ||
<p>An <code>.ignore</code> extension method is provided on strings, and can be used when declaring tests. All tests that are tagged with <code>.ignore</code> will be ignored in the test suite, including any that are tagged with <code>.only</code>.</p> | ||
<pre><code class="nohighlight"><span class="keyword">import</span><span> </span><span class="identifier">weaver</span><span>.</span><span class="identifier">_</span><span> | ||
</span><span class="keyword">import</span><span> </span><span class="identifier">cats</span><span>.</span><span class="identifier">effect</span><span>.</span><span class="identifier">_</span><span> | ||
|
||
</span><span class="keyword">object</span><span> </span><span class="type-name">MyIgnoreSuite</span><span> </span><span class="keyword">extends</span><span> </span><span class="type-name">SimpleIOSuite</span><span> { | ||
|
||
</span><span class="identifier">test</span><span>(</span><span class="string-literal">"test this"</span><span>) { | ||
</span><span class="type-name">IO</span><span>(</span><span class="identifier">success</span><span>) | ||
} | ||
|
||
</span><span class="identifier">test</span><span>(</span><span class="string-literal">"do not test this"</span><span>.</span><span class="identifier">ignore</span><span>) { | ||
</span><span class="type-name">IO</span><span>.</span><span class="identifier">raiseError</span><span>(</span><span class="keyword">new</span><span> </span><span class="type-name">Throwable</span><span>(</span><span class="string-literal">"Boom"</span><span>)) | ||
} | ||
|
||
}</span></code></pre> | ||
|
||
<h2 id="how-do-i-run-just-one-test-in-a-suite" class="section"><a class="anchor-link left" href="#how-do-i-run-just-one-test-in-a-suite"><i class="icofont-laika link"></i></a>How do I run just one test in a suite?</h2> | ||
<p>A <code>.only</code> extension method is provided on strings, and can be used when declaring tests. When at least one test is "tagged" as such in a suite, weaver will ignore all tests but the ones that have the "only" tag. Note: <code>.ignore</code> has precedence over <code>.only</code>.</p> | ||
<pre><code class="nohighlight"><span class="keyword">import</span><span> </span><span class="identifier">weaver</span><span>.</span><span class="identifier">_</span><span> | ||
</span><span class="keyword">import</span><span> </span><span class="identifier">cats</span><span>.</span><span class="identifier">effect</span><span>.</span><span class="identifier">_</span><span> | ||
|
||
</span><span class="keyword">object</span><span> </span><span class="type-name">MyOnlySuite</span><span> </span><span class="keyword">extends</span><span> </span><span class="type-name">SimpleIOSuite</span><span> { | ||
|
||
</span><span class="identifier">test</span><span>(</span><span class="string-literal">"test this"</span><span>.</span><span class="identifier">only</span><span>) { | ||
</span><span class="type-name">IO</span><span>(</span><span class="identifier">success</span><span>) | ||
} | ||
|
||
</span><span class="identifier">test</span><span>(</span><span class="string-literal">"do not test this"</span><span>) { | ||
</span><span class="type-name">IO</span><span>.</span><span class="identifier">raiseError</span><span>(</span><span class="keyword">new</span><span> </span><span class="type-name">Throwable</span><span>(</span><span class="string-literal">"Boom"</span><span>)) | ||
} | ||
|
||
}</span></code></pre> | ||
|
||
<h3 id="regarding-inaccurate-test-duration-when-using-intellij" class="section"><a class="anchor-link left" href="#regarding-inaccurate-test-duration-when-using-intellij"><i class="icofont-laika link"></i></a>Regarding inaccurate test duration when using IntelliJ</h3> | ||
<p>Because of modeling incompatibilities between weaver and IntelliJ, the JUnit runner is implemented in a way that makes it impossible for individual test duration to be reported correctly by the IntelliJ's test runner. Sorry about that!</p> | ||
|
||
|
||
<hr class="footer-rule"/> | ||
<footer> | ||
weaver-test is a <a href="https://typelevel.org/">Typelevel</a> project distributed under the <a href="https://www.apache.org/licenses/LICENSE-2.0.txt">Apache-2.0</a> license. | ||
</footer> | ||
|
||
|
||
</main> | ||
|
||
</div> | ||
|
||
</body> | ||
|
||
</html> |
Oops, something went wrong.