chore(test-utils): Separate tape tests from vitest and clean up CI#10061
Merged
chrisgervang merged 20 commits intomasterfrom Apr 7, 2026
Merged
chore(test-utils): Separate tape tests from vitest and clean up CI#10061chrisgervang merged 20 commits intomasterfrom
chrisgervang merged 20 commits intomasterfrom
Conversation
74d609a to
5e771d7
Compare
Collaborator
Author
|
Re: Cursor Bugbot comment about missing
Existing tape/probe.gl users continue using the default import with no changes needed. |
chrisgervang
commented
Mar 4, 2026
e5db479 to
14d2cd8
Compare
c6b6e8c to
63446d4
Compare
- Add @deck.gl/test-utils/vitest entry point with vi.spyOn as default spy factory - Add @deck.gl/test-utils/tape entry point with probe.gl makeSpy default (with deprecation warning) - Extract SpyFactory abstraction in lifecycle-test.ts for spy provider flexibility - Add tape-compat and vitest-entry smoke tests to verify both paths work - Update package.json exports to support both entry points - Add vitest 4.0.18 as optional peer dependency Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The eslint-plugin-import namespace rule fails parsing vite module internals. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The index.ts was exporting directly from lifecycle-test.ts which requires createSpy, breaking existing tests. Now exports from tape.ts which provides a default spy factory. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Restore JSDoc comments that were stripped from lifecycle-test.ts - Add 'called' property to Spy type for TypeScript compatibility with probe.gl spies Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Restore original lifecycle-test.ts and reapply minimal SpyFactory abstraction changes to avoid unintended formatting modifications. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…py cleanup - Remove vitest-specific restoreSpy from core lifecycle-test.ts - Add ResetSpy type and resetSpy option to TestLayerOptions - tape.ts: default resetSpy calls spy.reset() (preserves original behavior) - vitest.ts: default resetSpy calls spy.mockRestore() This keeps the core library framework-agnostic by letting each entry point define its own spy cleanup behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both createSpy and resetSpy now warn users to explicitly pass them, guiding migration to framework-specific spy handling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Avoids triggering deprecation warning during CI by explicitly passing resetSpy alongside createSpy. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tions Add cleanupAfterLayerTestsAsync() that yields to the event loop before destroying WebGL resources. This prevents "getProgramInfoLog" errors from luma.gl's async shader error reporting trying to access already-destroyed WebGLProgram handles. Also removes unused imports from setup-gl.ts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9211999 to
c337c4e
Compare
felixpalmer
approved these changes
Mar 10, 2026
- Use master versions for all dependencies - Keep shared getResourceCountDelta() helper to avoid duplication - Include timeout duration in test-runner error messages - Remove redundant tape-compat.ts (covered by master's tape-compat.spec.ts) - Accept master's full vitest.config.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove duplicate tape-compat CI step and nonexistent test-vitest-smoke script - Remove duplicate tape-compat entry in .ocularrc.js pointing to deleted file - Remove vitest-entry smoke test (redundant with 88 existing test files) - Remove unused tap-spec devDependency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Only referenced in codemod fixture inputs (static test data). Migration RFC explicitly called for its removal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pessimistress
approved these changes
Apr 7, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename tape-compat.spec.ts to tape-compat.tape.spec.ts to distinguish tape-based tests from vitest tests. Add global *.tape.spec.ts exclude in vitest.config.ts so they're never picked up by vitest projects. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d03f593. Configure here.
Spread configDefaults.exclude to avoid overriding built-in excludes for node_modules, .git, etc. Co-Authored-By: Claude Opus 4.6 <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.

Summary
tape-compat.spec.ts→tape-compat.tape.spec.tsto distinguish tape-based tests from vitest tests*.tape.spec.tsexclude invitest.config.tsso tape tests are never picked up by vitest projects.ocularrc.jsto reference the renamed filetest/smoke/vitest-entry.spec.ts(covered by 88 existing test files importing@deck.gl/test-utils/vitest)Test plan
test-nodejob passesyarn test-tape-compatstill runs the tape backward compat smoke testyarn test-ciruns all vitest projects without picking up tape tests🤖 Generated with Claude Code
Note
Medium Risk
Test discovery and CI behavior changes by globally excluding
**/*.tape.spec.tsfrom Vitest; misnaming or glob mistakes could cause tests to be skipped or not executed in CI.Overview
Separates the legacy tape-based smoke test from the Vitest test suite by renaming the tape compat spec to
tape-compat.tape.spec.tsand updating.ocularrc.jsto point at the new entry.Updates
vitest.config.tsto globally exclude**/*.tape.spec.tsacross all Vitest projects, preventing tape tests from being picked up duringyarn test-ciruns, and removes the now-redundanttest/smoke/vitest-entry.spec.ts.Reviewed by Cursor Bugbot for commit d4f1725. Bugbot is set up for automated code reviews on this repo. Configure here.