<commit_before>import React from 'react';
import { shallow, mount } from 'enzyme';
import EventsMap from '../src/components/EventsMap';

describe('EventsMap', () => {
  const events = [{
    location: {
      coordinates: {
        coordinates: [59, 18],
      },
    },
  },
  {
    location: {
      coordinates: {
        coordinates: [59, 18],
      },
    },
  },
  ];
  describe('without props', () => {
    let wrapper;


    beforeEach(() => {
      wrapper = mount(<EventsMap events={events} />);
    });

    it('should be defined', () => {
      expect(wrapper).toBeDefined();
    });

    it('zoom prop should be set to 11 by defaultProps', () => {
      expect(wrapper.props().zoom).toBe(11);
    });

    it('center.lat prop should be set to defaultProps', () => {
      expect(wrapper.props().center.lat).toBeDefined();
    });

    it('center.lng prop should be set by defaultProp', () => {
      expect(wrapper.props().center.lng).toBeDefined();
    });

    it('should contain MapMarker', () => {
      const MapMarker = wrapper.find('MapMarker').length;
      expect(MapMarker).toBeGreaterThan(0);
    });

    it('should contain GoogleMapReact', () => {
      const GoogleMapReact = wrapper.find('GoogleMapReact').length;
      expect(GoogleMapReact).toBe(1);
    });
  });
  describe('with props', () => {
    let wrapper;
    const zoom = 12;
    const center = {
      lat: 59,
      lng: 18,
    };


    beforeEach(() => {
      wrapper = mount(<EventsMap zoom={zoom} events={events} center={center} />);
    });

    it('zoom prop should be set to 12', () => {
      expect(wrapper.props().zoom).toBe(12);
    });

    it('events prop should have a length of 2', () => {
      expect(wrapper.props().events.length).toBe(2);
    });

    it('center.lat prop should be 59', () => {
      expect(wrapper.props().center.lat).toBe(59);
    });

    it('center.lng prop should be 18', () => {
      expect(wrapper.props().center.lng).toBe(18);
    });
  });
});
<commit_msg>fixed broken test<commit_after>import React from 'react';
import { mount } from 'enzyme';
import GoogleMapReact from 'google-map-react';
import EventsMap from '../src/components/EventsMap';

describe('EventsMap', () => {
  const events = [{
    location: {
      coordinates: {
        coordinates: [59, 18],
      },
    },
  },
  {
    location: {
      coordinates: {
        coordinates: [59, 18],
      },
    },
  },
  ];
  describe('without props', () => {
    let wrapper;


    beforeEach(() => {
      wrapper = mount(<EventsMap events={events} />);
    });

    it('should be defined', () => {
      expect(wrapper).toBeDefined();
    });

    it('zoom prop should be set to 11 by defaultProps', () => {
      expect(wrapper.props().zoom).toBe(11);
    });

    it('center.lat prop should be set to defaultProps', () => {
      expect(wrapper.props().center.lat).toBeDefined();
    });

    it('center.lng prop should be set by defaultProp', () => {
      expect(wrapper.props().center.lng).toBeDefined();
    });

    it('should contain MapMarker', () => {
      const MapMarker = wrapper.find('MapMarker').length;
      expect(MapMarker).toBeGreaterThan(0);
    });

    it('should contain GoogleMapReact', () => {
      const googleMapReact = wrapper.find(GoogleMapReact).length;
      expect(googleMapReact).toBe(1);
    });
  });
  describe('with props', () => {
    let wrapper;
    const zoom = 12;
    const center = {
      lat: 59,
      lng: 18,
    };


    beforeEach(() => {
      wrapper = mount(<EventsMap zoom={zoom} events={events} center={center} />);
    });

    it('zoom prop should be set to 12', () => {
      expect(wrapper.props().zoom).toBe(12);
    });

    it('events prop should have a length of 2', () => {
      expect(wrapper.props().events.length).toBe(2);
    });

    it('center.lat prop should be 59', () => {
      expect(wrapper.props().center.lat).toBe(59);
    });

    it('center.lng prop should be 18', () => {
      expect(wrapper.props().center.lng).toBe(18);
    });
  });
});

{'fraction_non_alphanumeric': 0.18967229394240318, 'fraction_numerical': 0.016881827209533268, 'mean_word_length': 2.603756708407871, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 37, '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': '219405', 'n_tokens_mistral': 1302, 'n_tokens_neox': 1232, 'n_words': 257}