docs(test-utils): add Vitest setup guide and examples#10345
Open
chrisgervang wants to merge 1 commit into
Open
docs(test-utils): add Vitest setup guide and examples#10345chrisgervang wants to merge 1 commit into
chrisgervang wants to merge 1 commit into
Conversation
Addresses community feedback (discussion #10223) by documenting the `@deck.gl/test-utils/vitest` entry point with setup instructions and usage examples for testLayer and generateLayerTests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #10223
Background
Community feedback requested documentation for using
@deck.gl/test-utilswith Vitest, including setup instructions and working examples.Change List
vitest.config.tsexampletestLayerandgenerateLayerTestsdocs alongside existing tape examples@deck.gl/test-utils/vitestimport pathNote
Low Risk
Documentation-only changes with no runtime or API behavior impact.
Overview
Documents how to run layer lifecycle tests with Vitest using the
@deck.gl/test-utils/vitestentry point (built-invi.spyOn()), in response to community requests (#10223).The overview gains a Using with Vitest section: install notes, why Vitest Browser Mode + Playwright is required (real WebGL2; JSDOM is not supported), a sample
vitest.config.tswith SwiftShader flags, and a minimalScatterplotLayertest.testLayerandgenerateLayerTestspages now lead with Vitest examples (alongside existing tape samples) and their Usage blocks show imports from@deck.gl/test-utils/vitestinstead of the default package path.Reviewed by Cursor Bugbot for commit 22d6c5d. Bugbot is set up for automated code reviews on this repo. Configure here.