<commit_before>describe("Map", () => {
    it("should render with the map structure", () => {
        //
    });

    it("renders with classes", () => { // test against mx-google-maps
        // 
    });

    it("should load the google maps script with API key", () => {
        //
    });

    it("should load the google maps script without API key", () => {
        //
    });

    it("should add a resize listener", () => {
        //
    });

    it("should center the map on resize", () => {
        //
    });

    it("should remove the resize listener", () => {
        //
    });

    describe("with no address", () => {
        it("should not look up the location", () => {
            //
        });

        it("should not display a marker", () => {
            //
        });

        it("should center to the default address", () => {
            //
        });
    });

    describe("with a valid address", () => {
        it("should lookup the location", () => {
            //
        });

        it("should render a marker", () => {
            //
        });

        it("should center to the location of the address", () => {
            //
        });

        it("should display the first marker if multiple locations are found", () => {
            // 
        });
    });

    describe("with an invalid address", () => {
        it("should fail to find a location", () => {
            //
        });

        it("should not render a marker", () => {
            //
        });

        it("should center to the default address", () => {
            //
        });

        it("should display an error", () => {
            //
        });
    });

    describe("when offline", () => {
        it("should show a user error on loading a map", () => {
            //
        });

        it("should show a user error when looking up an address", () => {
            //
        });
    });
});<commit_msg>set up google mock in map spec<commit_after>import { shallow } from "enzyme";
import { createElement } from "react";

import { Map, MapProps } from "../Map";

import { EventMock, GeocoderLocationType, GeocoderMock, GeocoderStatus, LatLngBoundsMock,
    LatLngMock, MapsMock, MarkerMock } from "../../../../../../../tests/mocks/GoogleMaps";

describe("Map", () => {

    window.google = window.google || {};
    window.google.maps = window.google.maps || {};
    window.google.event = window.google.event || {};
    const originalMap = window.google.maps.Map;
    const originalGeocoder = window.google.maps.Geocoder;
    const originalLatLngBounds = window.google.maps.LatLngBounds;
    const originalLatLng = window.google.maps.LatLng;
    const originalMarker = window.google.maps.Marker;
    const originalEvent = window.google.maps.event;

    const address = "Lumumba Ave, Kampala, Uganda";


    beforeEach(() => {
        window.google.maps.Geocoder = GeocoderMock;
        window.google.maps.Map = MapsMock;
        window.google.maps.LatLngBounds = LatLngBoundsMock;
        window.google.maps.LatLng = LatLngMock;
        window.google.maps.Marker = MarkerMock;
        window.google.maps.event = EventMock;
        window.google.maps.GeocoderStatus = GeocoderStatus;
        window.google.maps.GeocoderStatus = GeocoderLocationType;
    });

    it("should render with the map structure", () => {
        //
    });

    it("renders with classes", () => { // test against mx-google-maps
        // 
    });

    it("should load the google maps script with API key", () => {
        //
    });

    it("should load the google maps script without API key", () => {
        //
    });

    it("should add a resize listener", () => {
        //
    });

    it("should center the map on resize", () => {
        //
    });

    it("should remove the resize listener", () => {
        //
    });

    describe("with no address", () => {
        it("should not look up the location", () => {
            //
        });

        it("should not display a marker", () => {
            //
        });

        it("should center to the default address", () => {
            //
        });
    });

    describe("with a valid address", () => {
        it("should lookup the location", () => {
            //
        });

        it("should render a marker", () => {
            //
        });

        it("should center to the location of the address", () => {
            //
        });

        it("should display the first marker if multiple locations are found", () => {
            // 
        });
    });

    describe("with an invalid address", () => {
        it("should fail to find a location", () => {
            //
        });

        it("should not render a marker", () => {
            //
        });

        it("should center to the default address", () => {
            //
        });

        it("should display an error", () => {
            //
        });
    });

    describe("when offline", () => {
        it("should show a user error on loading a map", () => {
            //
        });

        it("should show a user error when looking up an address", () => {
            //
        });
    });

    afterEach(() => {
        // Probably its good enough the reset fully.
        // window.google = undefined;
        window.google.maps.Map = originalMap;
        window.google.maps.Geocoder = originalGeocoder;
        window.google.maps.LatLngBounds = originalLatLngBounds;
        window.google.maps.LatLng = originalLatLng;
        window.google.maps.Marker = originalMarker;
        window.google.maps.event = originalEvent;
    });
});
{'fraction_non_alphanumeric': 0.1623167679656775, 'fraction_numerical': 0.0, 'mean_word_length': 1.641643059490085, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 55, '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': '3834856', 'n_tokens_mistral': 1556, 'n_tokens_neox': 1495, 'n_words': 385}