bito-code-review[bot] commented on PR #44042:
URL: https://github.com/apache/superset/pull/44042#issuecomment-5595040027

   <!-- Bito Reply -->
   The flagged issue is correct: the current test mocks `maplibre-gl` entirely, 
which prevents it from verifying that the worker files are correctly copied, 
served with the right MIME type, or that the worker's internal module 
resolution works. 
   
   To resolve this, you can replace the full mock with a partial mock that 
allows the worker-loading logic to be tested in a more realistic environment, 
or add an integration test that verifies the worker file existence and 
accessibility. Given the constraints, a robust approach is to verify the 
`setWorkerUrl` configuration as you have, and supplement it with a test that 
attempts to fetch the worker file in a simulated environment.
   
   Would you like me to fetch all other comments on this PR to validate them 
and implement fixes for the rest as well?
   
   
**superset-frontend/plugins/plugin-chart-point-cluster-map/test/MapLibre.test.tsx**
   ```
   jest.mock(
     'maplibre-gl',
     () => ({
       __esModule: true,
       ...jest.requireActual('maplibre-gl'),
       setWorkerUrl: jest.fn(),
     }),
     { virtual: true },
   );
   ```


-- 
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]

Reply via email to