Skip to content

test(parse): add unit tests for readJsonBodyOption - #48

Closed
iborazzi wants to merge 1 commit into
ProjectOpenSea:mainfrom
iborazzi:test/add-tests-for-read-json-body-option
Closed

test(parse): add unit tests for readJsonBodyOption#48
iborazzi wants to merge 1 commit into
ProjectOpenSea:mainfrom
iborazzi:test/add-tests-for-read-json-body-option

Conversation

@iborazzi

Copy link
Copy Markdown

Description

Adds unit test coverage for readJsonBodyOption in src/parse.ts.

Details

  • Tests reading and parsing a valid JSON file.
  • Tests error handling when the specified JSON file does not exist.
  • Tests error handling when the file contains invalid JSON.

@ryanio

ryanio commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Thanks, readJsonBodyOption was untested and now it is not.

This repo is a read-only mirror, so the tests are recreated in our internal monorepo with you credited as co-author. Two small changes on the way in: the file arrived with a UTF-8 BOM, which our format check rejects, and I moved the temp directory from a Date.now() suffix to mkdtempSync so two concurrent runs cannot collide on the same path.

Closing in favor of the internal change, which ships in the next release.

@ryanio ryanio closed this Aug 22, 2026
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.

2 participants