Example #1
0
  'news up Options with given object': sinon.test(function () {
    this.stub(hub, 'Options');
    var config = { allResults : true };

    hub.options(config);

    sinon.assert.calledOnce(hub.Options);
    sinon.assert.calledWithNew(hub.Options);
    sinon.assert.calledWith(hub.Options, config);
  }),
        it('should create a map instance with the supplied options', function () {
            sinon.assert.notCalled(fakeGoogle.maps.Map);
            givenGoogleMapsLibHasLoaded();

            MapLoader.create(mapContainer, fakeMapOptions);

            sinon.assert.calledOnce(fakeGoogle.maps.Map);
            sinon.assert.calledWith(fakeGoogle.maps.Map, mapContainer, fakeMapOptions);
            sinon.assert.calledWithNew(fakeGoogle.maps.Map);
        });
 it('should connect to __webpack_hmr', function() {
   sinon.assert.calledOnce(window.EventSource);
   sinon.assert.calledWithNew(window.EventSource);
   sinon.assert.calledWith(window.EventSource, '/__webpack_hmr');
 });