fix: PR comment and updated test case

on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
darshanr0107
2025-07-16 17:27:08 +05:30
parent aea16eaf7e
commit 3ab0961bdc
2 changed files with 2 additions and 2 deletions

View File

@@ -161,7 +161,7 @@ describe('pie', () => {
"rats" : 40.12
`);
}).rejects.toThrowError(
'"dogs" has invalid value: -60.67.Negative values are not allowed in pie charts. All slice values must be > 0'
'"dogs" has invalid value: -60.67. Negative values are not allowed in pie charts. All slice values must be >= 0.'
);
});

View File

@@ -36,7 +36,7 @@ const clear = (): void => {
const addSection = ({ label, value }: D3Section): void => {
if (value < 0) {
throw new Error(
`"${label}" has invalid value: ${value}.Negative values are not allowed in pie charts. All slice values must be > 0.`
`"${label}" has invalid value: ${value}. Negative values are not allowed in pie charts. All slice values must be >= 0.`
);
}
if (!sections.has(label)) {