Repository navigation
docs: add Rust and TypeScript module unit testing guide - #6245
Open
clockwork-labs-bot wants to merge 1 commit into
Open
clockwork-labs-bot wants to merge 1 commit into
clockwork-labs-bot wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Description of Changes
Add a unit-testing how-to for Rust and TypeScript modules, with links from both quickstarts and Developer Resources.
test-utils), and Node/Vitest setup withspacetimedbModuleTestPlugin.unstablefeature requirement.Source references
API and ABI breaking changes
None. Documentation only.
Rollback safety impact
n/a
Expected complexity level and risk
Testing
Examples are extracted directly from the guide and run in temporary, standalone projects using the published
spacetimedb2.12.0 packages, not repository-only imports.tsc --noEmitpassed for module, tests, and Vitest config.pnpm --dir docs typecheckpassed.pnpm --dir docs buildpassed, including broken-link checks. It emitted the existing Browserslist age and ask-ai Markdown conversion warnings.test-utils,unstable; the 2 reducer tests also passed with onlytest-utils.pnpm --dir docs buildpassed again after the dependency-workaround note was added.git diff --cached --checkpassed; TypeScript examples use camelCase.Native Rust dependency finding
A clean lockfile against crates.io currently selects ICU 2.3, which fails while compiling the transitive
temporal_rs0.1.2 dependency (including a missingAnyCalendarDifferenceError). The repository lockfile uses ICU 2.1.1. Verified that pinningicu_calendarandicu_localeto=2.1.1in dev-dependencies resolves the failure; the guide includes that narrowly scoped troubleshooting workaround. This is an upstream/runtime dependency issue, not a failure in the example module. No product dependency changes are included in this docs PR.