Closed ZakarFin closed 2 years ago
Add this to your jest.config.js
:
module.exports = {
transform: {
'^.+\.(t|j)sx?$': 'ts-jest'
},
transformIgnorePatterns: ['/node_modules/(?!(ol|geotiff|quick-lru))']
};
However this is but the beginning of your problems since quick-lru
triggers another problem in jest - linked to Symbol.toStringTag
@ZakarFin solved by https://github.com/sindresorhus/quick-lru/pull/39
@mmomtchev @ZakarFin is there an action required for geotiff.js as well?
@constantinius you can probably bump the quick-lru
version number in your package.json
but since you are using semver ^, a new install will use the new version anyway
Thanks everyone! Looks like adding both geotiff
and quick-lru
to Jest-config makes this work now: https://github.com/oskariorg/oskari-frontend/pull/1792
We use OpenLayers as a dependency (which uses geotiff as dependency
"geotiff": "^2.0.2"
) and our builds started failing (Jest transform issue) after the very recent 2.0.5 release of geotiff. It works if I declare the older 2.0.4 version to be used on our dependencies: https://github.com/oskariorg/oskari-frontend/pull/1779.Any suggestions on how to fix this to work with geotiff 2.0.5?
Here's what Jest reports on our CI build: