Repository navigation
Conversation
Deploying rstest with
|
| Latest commit: |
f33b9d7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://98100fdf.rstest.pages.dev |
| Branch Preview URL: | https://9aoy-feat-type-testing.rstest.pages.dev |
Rsdoctor Bundle Diff AnalysisFound 13 projects in monorepo, 2 projects with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 core/browserPath:
📦 Download Diff Report: core/browser Bundle Diff 📁 core/mainPath:
📦 Download Diff Report: core/main Bundle Diff Generated by Rsdoctor GitHub Action |
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.
Motivation
Runtime assertions cannot verify inferred API types or published declarations. Add static type tests to Rstest's discovery and reporting flow without making ordinary runtime users install the type-testing implementation.
Changes
@rstest/typecheckpackage, loaded through a core-owned executor contract like browser mode. Core retains configuration, discovery and run finalization; missing or mismatched packages produce installation guidance.test,it,describe,assertTypeandexpectTypeOfAPIs from the new package. Its public declarations do not load core, Rsbuild or Rspack configuration types. Existing core registration imports remain recognized. Type assertions are explicit imports from the new package.tscorvue-tscCLI once per project (TypeScript 6 and 7 supported). The same invocation returns diagnostics and checked inputs, disables emission, overridesnoCheck, and reuses incremental disk results. Filters never hide whole-project diagnostics.--onlyFailuresselection and failure history across runtime and type tests. Finalize writes the cache once, preserving it for partial or bail-aborted runs.bailstops later type cases and subsequent project checks while each compiler invocation still checks its full project..only,.skip, parameterized/conditional modifiers and dynamic registration are unsupported.e2e/types, add package-loading and declaration-dependency regression tests, and update English/Chinese docs. Rspack aliases remain separate from TypeScript resolution; no adapter translation is needed.Editor companion: rstackjs/rstack-editor#111
Validation on macOS: full workspace build; 1,691 unit tests passed; 45 relevant type/selection/cache/bail/browser e2e tests passed, 3 headed tests skipped; lint/typecheck, unused-code checks and all pre-push checks passed. TypeScript 6.0.3, TypeScript 7.0.2 and vue-tsc 3.3.13 each passed valid → invalid → fixed assertions, including inherited
noCheck: true. TypeScript 6 and 7 also passed full failure → bail → fixed-onlyFailures CLI runs. Windows/Linux execution remains for CI.Pure type-test benchmark (measured at d6d2100, before the failure-history integration): Node 24.11.1 on Apple M4 Max, Vitest 5.0.5, 10 cases per file and 5 assertions per case. Identical workloads except the framework import:
@rstest/typecheckversusvitest. Five sequential paired repeats per configuration, alternating framework order (120 runs); all case counts verified. Cold removes compiler/framework disk caches, retaining OS caches; warm uses a fresh CLI process with the previous cold run's cache. Median seconds below; background desktop processes were not stopped.At 1,000 cases, the new entry loads 171 compiler inputs (70 declarations), versus Vitest's 190 (89 declarations); the earlier core-entry measurement loaded 553. Tests of core's own published API continue importing the real core entry rather than a substituted declaration.