Playground e2e harness + SCALE codec additions#238
Merged
Conversation
Migrate the JS package tests from the bespoke Bun runner to Vitest, matching the product-sdk testing style: colocated src/**/*.test.ts files, describe/it blocks, and expect() assertions. - Add vitest devDep + vitest.config.ts; test script runs `vitest run`. - Move the five test/*.test.mjs suites next to the code they cover and rewrite them with describe/it + expect. The wire-table loop becomes an it.each over every generated frame id. - The explorer registry test imports the source module so it runs without a prior build. - Exclude src/**/*.test.ts from the build tsconfig so tests never land in dist. - Scope a Prettier override (4-space, 100 width) to the test files. - Drop the unused setup-bun step from the ts-client CI job and refresh the docs and ts-client-checks skill.
Use Bun's built-in test runner: the repo already depends on bun, so this drops the Vitest devDependency (and its config) while keeping the same product-sdk-style describe/it/expect tests. - Imports come from "bun:test"; add @types/bun for editor support. - test script runs `bun test` (auto-discovers src/**/*.test.ts, no config). - Restore the setup-bun step on the ts-client CI job. - Refresh docs and the ts-client-checks skill.
Switch the in-iframe client to the host-transferred MessagePort handshake (truapi-ready / truapi-init) used by the WASM host runtime, and extend the SCALE primitives (Struct, _void, str, hex helpers) consumed by the generated codecs. Pulls @noble/hashes in as a hex-codec dependency.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
The truapi-ready/truapi-init handshake pairs with the WASM host's createIframeHost (#104). Keep sandbox.ts at base so merging to main does not break the deployed playground against the current host.
Replace the hand-rolled byte concatenation with the concatBytes helper now that @noble/hashes is a dependency.
Imod7
approved these changes
Jun 26, 2026
filvecchiato
approved these changes
Jun 26, 2026
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.
Extracts the playground and
@parity/truapiclient changes from the Rust-coreport PR (#104)