import React from 'react';
import { lorem } from './util';
import './css-loader.css';


class CssSample extends React.Component {
  render() {
    return (
      <div className="css-sample">
        <p>{ lorem(50) }</p>
        <p>{ lorem(50) }</p>
      </div>
    );
  }
}



describe('CSS', function() {
  this.header(`## CSS via webpack css-loader.`);
  before(() => {
    this
      .component( <CssSample/> );
  });
});

import React from 'react';
import { lorem } from './util';


const IS_BROWSER = typeof(window) !== 'undefined';
if (IS_BROWSER) {
  require('./css-loader.css');
}



class CssSample extends React.Component {
  render() {
    return (
      <div className="css-sample">
        <p>{ lorem(50) }</p>
        <p>{ lorem(50) }</p>
      </div>
    );
  }
}



describe('CSS', function() {
  this.header(`## CSS via webpack css-loader.`);
  before(() => {
    this
      .component( <CssSample/> );
  });
});

Add switch to only import CSS when in browser.
Hack: Add switch to only import CSS when in browser.

This prevents compile errors when spec JS is parsed on server.  Would
be nice to figure out a better way to handle this in the future.

JS is parsed on the server so that a copy of the specs are available in
memory.  This is to allow for `it.server` (yet to be implemented).
