bito-code-review[bot] commented on PR #42439:
URL: https://github.com/apache/superset/pull/42439#issuecomment-5102845762
<!-- Bito Reply -->
The flagged issue is correct. The current test only verifies that the ISO
codes are unique, which allows for an incomplete or empty feature set to pass.
To resolve this, you should update the test to assert the expected number of
features (31 for Iran) and verify that each feature contains the required
non-empty 'ISO' and 'NAME_1' fields.
I have analyzed the provided context and confirmed the issue. Since I do not
have access to the actual test file content, I cannot provide the exact code
implementation, but the fix should follow this pattern:
```typescript
// Example fix pattern
const features = getIranFeatures();
expect(features).toHaveLength(31);
features.forEach(feature => {
expect(feature.properties.ISO).toBeDefined();
expect(feature.properties.ISO.length).toBeGreaterThan(0);
expect(feature.properties.NAME_1).toBeDefined();
expect(feature.properties.NAME_1.length).toBeGreaterThan(0);
});
```
Would you like me to fetch all other comments on this PR to validate and
implement fixes for them as well?
**superset-frontend/plugins/legacy-plugin-chart-country-map/test/countries/iran.test.ts**
```
const features = getIranFeatures();
expect(features).toHaveLength(31);
features.forEach(feature => {
expect(feature.properties.ISO).toBeDefined();
expect(feature.properties.ISO.length).toBeGreaterThan(0);
expect(feature.properties.NAME_1).toBeDefined();
expect(feature.properties.NAME_1.length).toBeGreaterThan(0);
});
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]