Skip to content

Make sure window.proj4 is always restored in tests #4830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2016

Conversation

ahocevar
Copy link
Member

When the OpenLayers test suite is used with a custom build of proj4.js that does not include the somerc projection, it fails with the very misleading error Uncaught ReferenceError: proj4 is not defined. This is because the 'can use an alternative namespace for proj4' test fails and does not restore window.proj4. See proj4js/proj4js#170 for a more background.

By restoring window.proj4 in an afterEach function, we can avoid this misleading error.

@ahocevar ahocevar changed the title Make sure window.proj4 is always restored Make sure window.proj4 is always restored in tests Feb 13, 2016
@bartvde
Copy link
Member

bartvde commented Feb 15, 2016

good catch, LGTM

@fredj
Copy link
Member

fredj commented Feb 15, 2016

+1

ahocevar added a commit that referenced this pull request Feb 15, 2016
Make sure window.proj4 is always restored in tests
@ahocevar ahocevar merged commit ff07f3a into openlayers:master Feb 15, 2016
@ahocevar ahocevar deleted the proj4-tests branch February 15, 2016 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants