Skip to content

fix(history): reject fractional page sizes#55

Open
JerryNee wants to merge 1 commit into
TestSprite:mainfrom
JerryNee:fix/history-page-size-integer
Open

fix(history): reject fractional page sizes#55
JerryNee wants to merge 1 commit into
TestSprite:mainfrom
JerryNee:fix/history-page-size-integer

Conversation

@JerryNee

Copy link
Copy Markdown

Summary

  • make test result --history --page-size reject fractional values before building the request
  • keep the existing 1-100 bounds check, but add an integer check for values such as 1.5
  • add regression coverage that ensures no request is made for a fractional history page size

Repro

Before this change, testsprite test result test_abc --history --dry-run --page-size 1.5 --output json exited 0 and passed the fractional page size through. After this change it exits 5 with a local VALIDATION_ERROR naming page-size.

Verification

  • npm test -- src/commands/test.result.history.spec.ts
  • npm run typecheck
  • npm run lint
  • npm test
  • npm run build
  • node dist/index.js --output json test result test_abc --history --dry-run --page-size 1.5

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