test: cover null chart style validation - #314
Conversation
There was a problem hiding this comment.
Code Review
This pull request fixes a grammatical typo in the area chart description and adds a new unit test to verify that callTool rejects a null style parameter. The reviewer suggested simplifying the test case by removing optional parameters that are not relevant to the specific validation being tested.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
The new test only checks for a generic |
|
can help to fix the issue? |
17d4e1e to
da0c916
Compare
|
Fixed in the latest commit. I updated the test to check the specific null Checked locally:
|
|
Verified on branch with latest commit:
|
|
this is not fix the issue, just add an test case. Process the style = null case, make it works, this is fix the issue. |
|
Updated. You were right — the previous change only tested the rejection path. This now handles Checked locally:
|
Summary
style: nullchart input so it is rejected as invalid params before chart generationcallToolso the test does not call the remote chart serviceContext
Issue #313 shows
style: nullreaching the renderer and failing withCannot read properties of null. Currentmainalready rejects that input at validation time; this PR locks that behavior down so it does not regress.Verification
npm installnpm run buildnpm test -- --run __tests__/utils/callTool.spec.ts __tests__/charts/charts.spec.tsnpm test -- --runnpx biome check __tests__/utils/callTool.spec.ts src/charts/area.ts __tests__/charts/area.jsongit diff --checkRefs #313.