Repository navigation
test: add shared sanitized GitHub API fixtures - #245
Merged
Muskankr merged 1 commit intoNov 10, 2026
Merged
Conversation
|
@Subodh-17 is attempting to deploy a commit to the a2521729-9889's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
🎉 Congratulations on submitting your first pull request to OpenSourceMate!
- Automated CI checks will test your changes shortly.
- Please ensure your PR description links the corresponding issue (
Fixes #<number>) and follows our Contributing Guide. - If you are new to Git workflows, check out our First Contribution Guide.
- A maintainer will review your contribution soon. Thank you for your support!
Muskankr
approved these changes
Nov 10, 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.
Summary
Closes #232 by introducing shared, privacy-sanitized GitHub API v3 JSON fixtures under
fixtures/for backend tests (pytestandunittest) and frontend mock API / Jest tests.Changes
fixtures/covering users (4), repositories (6), languages (3), and public events (3), including standard, empty, fork-only, no-bio, large-collection (100repos /301profile), and multi-page pagination scenarios (12real sanitized responses,1derived4-event subset,3deterministic synthetic datasets).email: null,private: false,public: true, removednode_id,payload.commits, and verbose hypermedia fields), and cross-stack usage infixtures/README.md.backend/tests/fixture_loader.py, session fixturefixture_loaderinbackend/tests/conftest.py, andbackend/tests/test_fixtures_sanitization.pyenforcing recursivenode_id, email/token, event/privacy, language byte, and edge-case invariants.test_github_routes.py,test_github_service.py,test_github_pagination.py,test_skill_service.py) to consume shared fixtures while preserving exact route assertions and exercisinglanguages_empty.json,languages_single.json, andlanguages_multi.json.frontend/mocks/fixtures/users.ts,repositories.ts,skills.ts) andfrontend/mocks/handlers.ts(aligning/api/github/users/:username/repositorieswith backendRepositoryListSerializermetadata while retaining legacyoctocat/countassertions), and addedfrontend/__tests__/githubFixtures.test.ts.docs/mock-api.mdandCHANGELOG.md(Unreleased).Verification
pytest(test_fixtures_sanitization.py,test_github_routes.py,test_github_service.py,test_github_pagination.py,test_skill_service.py): 62 passed (exit 0).unittest(python -m unittest discover -s tests -p "test_skill_service.py" -vfrombackend/): 12 passed (exit 0).npx jest __tests__/githubFixtures.test.ts): 11 passed (exit 0).handleMockApiRequestin__tests__/mockApi.test.ts): 10/10 passed.ruff checkandruff format --checkonfixture_loader.py,test_fixtures_sanitization.py,conftest.py,test_github_routes.py,test_github_service.py,test_skill_service.py): passed (exit 0).npx prettier --checkacross all 24 Issue Create sanitized GitHub API fixtures for tests #232 JSON, Markdown, and TypeScript files): passed (exit 0).git diff --check: passed (exit 0).npx tsc --noEmit: 0 errors in Issue Create sanitized GitHub API fixtures for tests #232 files.mypyis not installed in the local Python environment, andnpm run buildwas not executed directly after the final edits on the workspace;0application files underapp/were modified.)Existing baseline limitations
37192a9:pytestretains 1 failure reproduced on37192a9(tests/test_config_and_utils_typing.py::test_validation_utility_typesrejecting@torvalds;260 passedon the branch vs243 passedon37192a9) and exits with Windows teardown status-1073741819.backend/tests/test_github_pagination.pyretains pre-existing Ruff diagnostics on untouched lines (17: unusedF401 Settings,201:UP017 timezone.utc,228: line wrap; repo-wideruff format --check .fails on25upstream files), while all+43added lines pass cleanly.jsdomResponse-related E2E tests insidemockApi.test.tsreproduced identically on37192a9(16 passed, 27 failedsuites;223 passed, 6 failedtests vs base15 passed, 27 failed; 212 passed, 6 faileddue to upstream[email protected]vs[email protected], JSX syntax in.test.tsfiles, and missingResponseinjsdom).npx tsc --noEmitretains 23 pre-existing diagnostic lines in 4.test.tsfiles containing JSX (activitySummary.test.ts,preferences.test.ts,profileHealth.test.ts,skillTimeline.test.ts).npm run lintfails identically on37192a9(ESLint 10.14.0vseslint-plugin-react:contextOrFilename.getFilename is not a function), andnpm run format:checkreferenced by CI is missing fromfrontend/package.json.Testing
backend/tests/test_fixtures_sanitization.pychecks JSON validity, recursivenode_idremoval, absence of email/token/payload.commits, repositoryprivate: false, eventpublic: true, language integer invariants, and edge-case counts/fields. Shared fixtures are integrated and verified acrosstest_github_routes.py,test_github_service.py,test_github_pagination.py,test_skill_service.py, andfrontend/__tests__/githubFixtures.test.ts(including deterministicfixedNowactivity summary classification forevents_active.json,events_occasional.json, andevents_empty.json,@octocat-realconsistency, and/repositoriespagination metadata).pytest,ruff, frontendjest --ci,tsc --noEmit, andnpm run lintwere executed on an isolated detached worktree of37192a9to confirm every failing full-suite check pre-exists upstream.Scope
No production application code (
backend/app/,frontend/app/,frontend/components/,frontend/utils/) was modified. Changes are strictly limited to shared fixtures (fixtures/), test helpers and suites (backend/tests/,frontend/__tests__/), frontend mocks (frontend/mocks/), and documentation (fixtures/README.md,docs/mock-api.md,CHANGELOG.md).