Open
Description
I would like a way to verify a fail scenario to insure code properly messages invalid parameters.
For example:
@mixin theme-color($property: 'background-color') {
// Verify an allowed property was passed in
@if not(($property == background-color)) and not(($property == color)) {
@error 'The `theme-color` mixin only accepts `background-color` or `color`';
}
---- do stuff ----
}
Test:
@include test('should fail with invalid property') {
@include assert-fail {
@include output {
@include theme-color(foo);
}
@include expect {
@include fail-message('The `theme-color` mixin only accepts `background-color` or 'color`');
}
}
}
Today when I attempt a test like this, I get the fail-message in the terminal, however, the test itself fails and my other tests don't run.