Skip to content
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

Port over fetchMap tests #127

Open
wants to merge 7 commits into
base: felix/fetchmap-implementation
Choose a base branch
from

Conversation

felixpalmer
Copy link
Contributor

For #124

Change list

  • Copy across tests from deck.gl
  • Port tests to vitest
  • Remove parseMap tests that we too much hassle to port and will likely change anyway due to the deprecation of document mode

@felixpalmer felixpalmer requested a review from donmccurdy March 12, 2025 14:20
@felixpalmer felixpalmer mentioned this pull request Mar 12, 2025
7 tasks
Comment on lines 6 to 7
export * from './layer-map.js';
export * from './parse-map.js'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional - if something is included only for testing I'm trying to add @internal TSDoc annotations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if there is a way to avoid having to export these at all? In the deck.gl repo it is possible to "reach into" the source, like this: https://github.com/visgl/deck.gl/blob/master/test/modules/carto/api/basemap.spec.ts#L8

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we could configure Vitest and tsconfig.json to allow that, too. The downside is that we'd be unit testing uncompiled code, and very occasionally that could matter.

Perhaps the alternative would be to do something like https://github.com/antfu/vitest-package-exports, and test that any changes to internal vs. non-external package exports are 'expected'?

@felixpalmer felixpalmer force-pushed the felix/fetchmap-tests branch from 2e0d511 to e42747d Compare March 13, 2025 10:48
@felixpalmer felixpalmer force-pushed the felix/fetchmap-tests branch from f30d22f to 5554be9 Compare March 13, 2025 12:14
@felixpalmer felixpalmer force-pushed the felix/fetchmap-tests branch from 5219798 to 458538f Compare March 13, 2025 16:04
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.

2 participants