-
Notifications
You must be signed in to change notification settings - Fork 125
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
gdal.config.set is not a function #207
Comments
For your reference line 3 of import gdal from 'gdal' |
@brandonreavis @brianreavis Please help. I am not able to write a comprehensive test suite for my project. |
I am not very familiar with Jest, but it looks like jest is loading and running the same module twice in the same process, which is not what node is supposed to do. If loaded twice, these lines cause https://github.com/naturalatlas/node-gdal/blob/master/lib/gdal.js#L52-L55 I'd recommend asking someone who understands jest if there is a way to have dependencies only loaded once. |
Hi @AlokBansal8, I had the same problem here. To solve it I inserted the GDAL_DATA variable on the tests. "test": "GDAL_DATA=node_modules/gdal/deps/libgdal/gdal/data jest int --coverage --watch" 👍🚴♂️🚴♂️ |
When I try to run multiple test files using jest, I get following error:
But everything works fine if I run only one test file (whichever it may be).
The text was updated successfully, but these errors were encountered: