Skip to content

Commit

Permalink
PR #84 remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
shonie committed Sep 18, 2018
1 parent b7c217a commit 2c651e8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
height: var(--null-value);
overflow: var(--undefined-value);
font-size: var(--object-value-passed-by-mistake);
visibility: var(--true-value);
opacity: var(--false-value);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
height: null;
overflow: undefined;
font-size: [object Object];
visibility: true;
opacity: false;
}
8 changes: 5 additions & 3 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ var MOCK_JS_VARIABLES = {
'js-defined-no-prefix': '#ff0000'
};

var INVALID_JS_VARIABLES = {
var NON_STRING_VARIABLES = {
'number-value': 50,
'zero-value': 0,
'null-value': null,
'undefined-value': undefined,
'object-value-passed-by-mistake': {}
'object-value-passed-by-mistake': {},
'true-value': true,
'false-value': false,
};

var testPlugin = function(filePath, expectedFilePath, options) {
Expand Down Expand Up @@ -189,7 +191,7 @@ describe('postcss-css-variables', function() {
'should cast non-string values to string',
'js-defined-non-string-values-casted-to-string',
{
variables: INVALID_JS_VARIABLES
variables: NON_STRING_VARIABLES
}
);
});
Expand Down

0 comments on commit 2c651e8

Please sign in to comment.