<commit_before>var Radium = require('index.js');
var React = require('react/addons');

var {PrintStyle} = Radium;
var TestUtils = React.addons.TestUtils;


describe('Radium blackbox tests', () => {
  it('applies print styles through the PrintStyle component', () => {
    Radium(React.createClass({
      displayName: 'TestComponent',

      statics: {
        printStyles: {
          foo: {color: 'blue'},
          bar: {background: 'red'}
        }
      },

      render () {
        return (
          <div />
        );
      }
    }));

    var output = TestUtils.renderIntoDocument(<PrintStyle />);

    var style = React.findDOMNode(
      TestUtils.findRenderedDOMComponentWithTag(output, 'style')
    );

    expect(style.innerText).to.deep.equal(
      '@media print{.Radium-TestComponent-foo{color: blue !important;}.Radium-TestComponent-bar{background: red !important;}}' // eslint-disable-line max-len
    );
  });

});<commit_msg>adding ES6 component print styles test<commit_after>var Radium = require('index.js');
var React = require('react/addons');

var {PrintStyle} = Radium;
var {Component} = React;
var TestUtils = React.addons.TestUtils;

describe('Radium blackbox tests', () => {
  it('applies print styles through the PrintStyle component', () => {
    Radium(React.createClass({
      displayName: 'TestComponent',

      statics: {
        printStyles: {
          foo: {color: 'blue'},
          bar: {background: 'red'}
        }
      },

      render () {
        return (
          <div />
        );
      }
    }));

    class TestComponent2 extends Component {
      render () {
        return <div />;
      }
    }

    TestComponent2.displayName = 'TestComponent2';
    TestComponent2.printStyles = {
      main: {color: 'black'}
    };
    Radium(TestComponent2);

    var output = TestUtils.renderIntoDocument(<PrintStyle />);

    var style = React.findDOMNode(
      TestUtils.findRenderedDOMComponentWithTag(output, 'style')
    );

    expect(style.innerText).to.deep.equal(
      '@media print{.Radium-TestComponent-foo{color: blue !important;}.Radium-TestComponent-bar{background: red !important;}.Radium-TestComponent2-main{color: black !important;}}' // eslint-disable-line max-len
    );
  });

});
{'fraction_non_alphanumeric': 0.14717652289906624, 'fraction_numerical': 0.0031124944419742106, 'mean_word_length': 2.7815126050420167, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3200641', 'n_tokens_mistral': 687, 'n_tokens_neox': 674, 'n_words': 130}