Skip to content

Commit

Permalink
Add test to ensure setting CSS variables do not warn
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Dail committed Apr 9, 2017
1 parent 6dabd2e commit fe06c17
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/renderers/dom/shared/__tests__/CSSPropertyOperations-test.js
Expand Up @@ -253,4 +253,18 @@ describe('CSSPropertyOperations', () => {
'\n\nCheck the render method of `Comp`.',
);
});

it('should not warn when setting CSS variables', () => {
class Comp extends React.Component {
render() {
return <div style={{ '--foo-primary': 'red', backgroundColor: 'red' }} />;
}
}

spyOn(console, 'error');
var root = document.createElement('div');
ReactDOM.render(<Comp />, root);

expectDev(console.error.calls.count()).toBe(0);
});
});

0 comments on commit fe06c17

Please sign in to comment.