Closed nstjean closed 4 years ago
I figured out how to move it to a helper file! The existing support/jasmine.json
file was NOT being checked by the script. I had to add a helper directory in Gruntfile.js
!
I have added error checks in Geocoding.js
so that the functions will only execute if there is a google object - either a real one or a mock one. It was a bit tricky getting it set up so that it didn't mess up the mock object I just created in the tests, but I think I got it! I tested this on gh-pages, you can see that "the search for a place name" and "placename" display still work properly : https://publiclab.github.io/leaflet-blurred-location/examples/index.html
If this works properly it SHOULD mean that my fixes in LBLD and LEL are no longer needed! This should mean no warnings or errors even when there's no google api key given.
Awesome!
@jywarren This is all set to merge! And once merged can you publish to npm?
Sorry I missed this! Doing it now, thank you!!!
Done!
233
Be aware that if the google maps api ever changes we will also have to change our mock object in testing.
I suspect I will have to do a similar mock/stub in LBLD and possibly LEL to correct the same error with the blurredLocation object in testing.