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
chore(carto): Add test coverage for sources #8613
chore(carto): Add test coverage for sources #8613
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @donmccurdy and the rest of your teammates on Graphite |
0089c1d
to
68d6018
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding these 😊 !
} | ||
}; | ||
async function setupMockFetchMapsV3( | ||
cacheKey = btoa(Math.random().toFixed(4)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was it necessary to add this cache key?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a module-level request cache ...
deck.gl/modules/carto/src/api/request-with-parameters.ts
Lines 12 to 19 in 28fb60f
const REQUEST_CACHE = new Map(); | |
export async function requestWithParameters<T = any>({ | |
accessToken, | |
baseUrl, | |
parameters, | |
headers: customHeaders, | |
errorContext | |
}: { |
... and I couldn't see a way to clear that cache between test runs. The way that fetch()
calls are mocked now, tilejson requests are identical and would otherwise hit the cache.
chore(carto): Add test coverage for sources
68d6018
to
6642c64
Compare
+10% coverage in
@deck.gl/carto
.Related: