Skip to content

test: cover JSON import payload validation#211

Open
duct-tape2 wants to merge 1 commit into
outerbase:mainfrom
duct-tape2:duct-tape2/json-import-payload-validation
Open

test: cover JSON import payload validation#211
duct-tape2 wants to merge 1 commit into
outerbase:mainfrom
duct-tape2:duct-tape2/json-import-payload-validation

Conversation

@duct-tape2
Copy link
Copy Markdown

Summary

  • Add focused Vitest coverage for malformed JSON import payload shapes.
  • Cover application/json requests where data is missing, null, or an object instead of an array.
  • Assert the existing 400 validation response is returned and executeOperation is not called.

Bounty / Claim

/claim #71

This is a small test-only coverage slice for #71, separate from the active JSON import multipart upload / column mapping PR.

Verification

  • ./node_modules/.bin/vitest run src/import/json.test.ts -> 7 tests passed
  • ./node_modules/.bin/prettier --check src/import/json.test.ts -> passed
  • git diff --check -> passed
  • Hidden non-ASCII and CRLF checks on src/import/json.test.ts -> no matches

Notes

  • No production behavior changes.
  • No paid API required.
  • No secrets required.
  • Local verification included.

@duct-tape2
Copy link
Copy Markdown
Author

Hi, ping on this test coverage PR. Tests cover the JSON validation paths I noticed lacking - happy to expand to additional payload shapes or split into smaller focused PRs if that's easier to review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant