Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add code and tests to allow for testing errors #149

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
346 changes: 344 additions & 2 deletions docs/api-assert-values.html
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ <h3 class="item-subtitle">




<div class="requires-wrapper">


<div data-item-section="requires">

Expand Down Expand Up @@ -596,9 +597,57 @@ <h4 class="param-title">
</div>





<div data-item-section="used-by">

<h3 class="item-subtitle">
<span class="item-subtitle-main">Used By</span>

</h3>


















<div class="param-list">
<h4 class="param-title">
<span class="item-type">@mixin</span>

<a href="
private-assert.html#mixin--_assert-error-success" class="item-name">_assert-error-success()</a>



<span class="item-note">[private]</span>
</h4>


</div>





</div>



</div>



Expand Down Expand Up @@ -1355,7 +1404,8 @@ <h3 class="item-subtitle">




<div class="requires-wrapper">


<div data-item-section="requires">

Expand Down Expand Up @@ -1477,10 +1527,58 @@ <h4 class="param-title">
</div>





<div data-item-section="used-by">

<h3 class="item-subtitle">
<span class="item-subtitle-main">Used By</span>

</h3>


















<div class="param-list">
<h4 class="param-title">
<span class="item-type">@mixin</span>

<a href="
private-assert.html#mixin--_assert-error-fail" class="item-name">_assert-error-fail()</a>



<span class="item-note">[private]</span>
</h4>


</div>





</div>



</div>




Expand Down Expand Up @@ -1938,6 +2036,250 @@ <h4 class="param-title">






</section>














<section class="item" id="mixin--assert-error">










<div data-item-section="header">
<h2 class="item-title">

<span class="item-type">@mixin</span>



<a href="#mixin--assert-error" class="item-name">assert-error()</a>





</h2>













<div class="text-block">
<p>Assert that a mixin or function triggers an <code>@error</code>.</p>










</div>


</div>












<div data-item-section="parameter">

<h3 class="item-subtitle">
<span class="item-subtitle-main">Parameters</span>

</h3>









<div class="param-list">
<h4 class="param-title">


<span class="item-name">$message:</span>


<span class="value-type">(string)</span>

</h4>



<div class="param-details text-block">
<p>Optional message to check against the emitted message.
The emitted message must contain the expected message,
allowing for partial message validation.
This is a case-insensitive<span class="widont">&nbsp;</span>check.</p>

</div>

</div>

















</div>








<div data-item-section="examples">
<h3 class="item-subtitle">
<span class="item-subtitle-main">Example</span>
</h3>

















<div class="example">
<div class="example-code">


<div class="code-block">

<div class="code-header">
<span class="code-language">
scss
</span>


</div>




<pre class="hljs-pre"><code class="lang-scss">@include test(&#39;Some mixin does what it is supposed to do&#39;) {
@include assert-error(&#39;must pass valid params&#39;){
@include some-mixin($bad-params);
}
}</code></pre>
</div>



<div class="code-block">

<div class="code-header">
<span class="code-language">
css
</span>


<span class='code-description'>
compiled
</span>

</div>




<pre class="hljs-pre"><code class="lang-css">/* Test: Some mixin does what it is supposed to do */
/* */
</code></pre>
</div>


</div>


</div>


</div>























Expand Down
Loading