Skip to content

test(profiles): the org mock still sent the shape #26 retired, so main was red at 7 - #28

Merged
thinkclay merged 1 commit into
mainfrom
fix/org-mock-envelope
Sep 11, 2026
Merged

thinkclay merged 1 commit into
mainfrom
fix/org-mock-envelope

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

#26 moved OrganizationProfile, getOrganization() and the tests to the { data } envelope with the real columns — description and address as jsonb documents, industry as the embedded core.industries row, no size / location / founded_year — and its description says the msw handler was corrected alongside. It was not in the diff (src/__tests__/mocks/server.ts is absent from #26's file list). The handler kept returning the bare, invented shape, so every getOrganization test destructured data from a body that had none: 7 failures on main, TypeError: Cannot read properties of undefined.

This repo has no CI, so nothing flagged it; Scaffald/SaaS's pnpm prepush did, the first time the pointer was moved to #26.

The handler now returns what the API returns — checked against Scaffald/SaaS#743's live-response table — inside the envelope. 776/776.

🤖 Generated with Claude Code

…n was red at 7

#26 moved OrganizationProfile, getOrganization() and the tests to the
{ data } envelope with the real columns — description and address as jsonb
documents, industry as the embedded core.industries row, no size /
location / founded_year — and said the msw handler was corrected alongside.
It was not in the diff. The handler kept returning the bare, invented shape,
so every getOrganization test destructured `data` from a body that had none:
7 failures on main, TypeError on undefined.

The handler now returns what the API returns (checked against
Scaffald/SaaS#743's live-response table), inside the envelope. 776/776.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant