Jest snapshot different when testing through CI vs locally
<p>I've implemented jest snapshot testing, which works great. Only thing I can't solve is that my component is rendering a different snapshot on my CI. My test is:</p>

<pre><code>/* eslint-env jest */
/* eslint import/no-extraneous-dependencies: "off" */

import React from 'react';
import { shallow } from 'enzyme';
import { shallowToJson } from 'enzyme-to-json';
import Combobox from '../Combobox';

describe('&lt;Combobox /&gt;', () =&gt; {
  it('renders correctly', () =&gt; {
    const wrapper = shallow(
      &lt;Combobox
        items={[]}
        placeholder=""
        valueKey=""
        labelKey=""
      /&gt;
    );

    expect(shallowToJson(wrapper)).toMatchSnapshot();
  });
});
</code></pre>

<p>And the component is:</p>

<pre><code>import React, { PropTypes } from 'react';
import Select from 'react-select';

export default class Combobox extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      currentValue: null,
    };
    this.updateValue = this.updateValue.bind(this);
  }

  updateValue(newValue) {
    this.setState({
      currentValue: newValue,
    });
  }

  render() {
    return (
      &lt;Select
        placeholder={this.props.placeholder}
        valueKey={this.props.valueKey}
        labelKey={this.props.labelKey}
        options={this.props.items}
        value={this.state.currentValue}
        onChange={this.updateValue}
      /&gt;
    );
  }
}

Combobox.propTypes = {
  items: PropTypes.array.isRequired,
  placeholder: React.PropTypes.string.isRequired,
  valueKey: React.PropTypes.string.isRequired,
  labelKey: React.PropTypes.string.isRequired,
};
</code></pre>

<p>I'm using <code>enzyme</code> and <code>enzyme-to-json</code> to generate the snapshot. The component itself is a wrapper around <code>react-select</code>. When testing locally everything is fine, but on my CI it errors with:</p>

<pre><code>FAIL  src/components/__tests__/Combobox.test.jsx
  ● &lt;Combobox /&gt; › renders correctly

    Received value does not match the stored snapshot 1.

    - Snapshot
    + Received

    &lt;Select
        // ...
    -   optionComponent={[Function anonymous]}
    +   optionComponent={[Function Constructor]}
        // ...
    -   valueComponent={[Function anonymous]}
    +   valueComponent={[Function Constructor]}
        valueKey="" /&gt;

      at Object.&lt;anonymous&gt; (src/components/__tests__/Combobox.test.jsx:20:82)
      at process._tickCallback (internal/process/next_tick.js:103:7)
</code></pre>

<p>So <code>optionComponent</code> and <code>valueComponent</code> have different values, compared to my local snapshots. What could be causing this discrepancy between my local and my remote tests?</p>