test: add Stellar config validation property tests (Property 9)#1
Open
Markodiba wants to merge 1 commit into
Open
test: add Stellar config validation property tests (Property 9)#1Markodiba wants to merge 1 commit into
Markodiba wants to merge 1 commit into
Conversation
Generate network, asset pair, and contract address combinations via fast-check arbitraries. Run 100 iterations per property asserting: - valid combinations (network + horizon, + soroban RPC, + asset pairs, + contracts, all combined) always pass with no errors - mismatched horizon URL always fails with HORIZON_NETWORK_MISMATCH - non-URL horizon/soroban RPC always fails with field-level schema errors - invalid network enum always fails with stellar.network error - result.valid and result.errors are always structurally consistent - every error always carries field, message, and code Closes StellerCraft#48
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
Implements Property 9 — Stellar Configuration Validation property tests using fast-check.
Changes
apps/web/src/lib/customization/validate-stellar.property.test.ts— 9 property tests across 3 groups, 100 iterations eachProperties tested
Valid configurations always pass
AssetPairshape)Invalid configurations always fail with specific errors
HORIZON_NETWORK_MISMATCHonstellar.horizonUrlstellar.horizonUrlstellar.sorobanRpcUrlstellar.networkStructural invariants
result.validandresult.errorsare always consistentfield,message, andcodeNotes
StellarAsset,AssetPair) from@craft/typesDUPLICATE_COLORSCloses StellerCraft#48