Functionality for fallback values and Nested selectors - #24
Conversation
Test for Mixins that Nest Selectors ryanbahniuk#13. Fixed issue with properties that have fallback. E.g.: padding: 16px; padding: 1rem;
|
Thanks for the PR, will check this out this weekend. |
|
Can you add integration and unit tests for the new features? |
|
Sure, I'll start working on them this week, Also, I'll test the deepEqual assertion. Thanks for the reply |
|
I have some issues while running the tests, on the mixinResult and FuncResult test files: these two errors block all the tests from those files from running |
|
I checked out your branch and got all the tests to pass on Node 0.12.0 and Node 5.11.0. However, it is possible that your problem is due to the Sass binaries failing to install during |
|
Hello, |
|
@vanduynslagerp (totally forgot about this PR) I'm going to work on it later this week. I've had the issues with the unit tests and I'm trying to see what I can do about that |
|
Fixed the tests. The issue was caused by the paths that were not concatenated properly. Added the normalize-paths module to handle that issue. |
| for (var variableName in varz) { | ||
| sassVariables = sassVariables + '$' + variableName + ':' + varz[variableName] + ';'; | ||
| } | ||
| return sassVariables; |
There was a problem hiding this comment.
Can you undo the indentation changes to this file so the diff reads cleaner?
| } | ||
| ``` | ||
| ```js | ||
| sassaby.includedMixin('font-size').calledWithArgs('2').declaresProperties('max-height', ['32px', '2rem']); |
There was a problem hiding this comment.
I think I'd rather have this functionality in the current API. I could see declares taking either a string or an array. If it is an array with one item it will echo current behavior and if its an array with multiple items it will make the fallback assertion defined here.
|
I've fixed all the issues, and it seems that I also had some issues with the coverage. It is now at 100%. |
|
Looks good. Did you see my previous comment (got collapsed by GitHub) that I think the new
What do you think about that? |
|
@ryanbahniuk I've changed declares to work both with arrays and Strings and removed the declaresProperties method. See: mixinResult.js |
|
@rtrufin looks good. Can you make sure the docs match the new updates? |
declaresProperties has been merged into the declares method
Test for Mixins that Nest Selectors #13.
Fixed issue with properties that have fallback.
E.g.: