test: Add dashboard test fixture framework - #51
Open
Favouratambi wants to merge 1 commit into
Open
Conversation
- Add Jest + ts-jest + @testing-library/react test infrastructure - Create 6 fixture modules: wallet, compliance, assets, portfolio, transactions, errors with typed interfaces - Add 40 tests across 6 test suites validating all fixtures - Add docs/test-fixtures.md with full fixture reference and usage guide - Fix .gitignore to exclude node_modules, .next, out, .env*.local - Update README with testing section and fixture guide link - Update package.json with test scripts and dev dependencies Closes #20
Contributor
|
@Favouratambi please resolve and fix merge conflicts |
Contributor
| \nGitHub has not finished calculating whether this PR can be merged cleanly.\n\nThe auto-merge automation will skip this PR for now. Re-run the automation later. |
Contributor
| \nThis PR is currently blocked by merge conflicts.\n\nPlease update the branch with the latest main branch and resolve the conflicts before it can be merged. |
Contributor
|
@Favouratambi please resolve and fix merge conflicts |
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.
Closes #20
Summary
Adds a reusable test fixture framework with 6 fixture modules, 40 tests, Jest infrastructure, and documentation.
Test infrastructure
@/->src/)npm testandnpm run test:watchscriptsFixture modules (src/fixtures/)
wallet.tscompliance.tsassets.tsportfolio.tstransactions.tserrors.tsAll fixtures use non-real address patterns (
FOR-FIXTURE-ONLY). No secrets or real keys.Tests (40 total, 6 suites)
wallet.test.ts— 5 tests: address/network validation, state checkscompliance.test.ts— 7 tests: whitelist states, mock checker edge casesassets.test.ts— 8 tests: balance values, uniqueness, edge casesportfolio.test.ts— 6 tests: asset counts, tickers, address patternstransactions.test.ts— 6 tests: status values, error messages, hash presenceerrors.test.ts— 8 tests: codes, messages, categories, uniqueness, no secretsDocumentation
docs/test-fixtures.md— full reference with fixture tables, usage examples, conventions, and guide for adding new fixturesOther changes
.gitignoreupdated (was only.idea/; now excludesnode_modules/,.next/,out/,.env*.local)package.jsonupdated with test scripts and dev dependenciesREADME.mdupdated with testing section