Skip to content

Commit

Permalink
feat: add code and tests to allow for testing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
DesignByOnyx committed Jun 22, 2019
1 parent 657abdc commit c2c3e9f
Show file tree
Hide file tree
Showing 7 changed files with 1,221 additions and 3 deletions.
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

0 comments on commit c2c3e9f

Please sign in to comment.