sadpandajoe opened a new pull request, #37623:
URL: https://github.com/apache/superset/pull/37623

   ## Summary
   
   Updates DatasetList test files to use the new fetch-mock v12 API, fixing 
TypeScript compilation errors.
   
   #36681 added comprehensive RTL and integration tests for DatasetList using 
the fetch-mock v11 API. Subsequently, #36662 upgraded fetch-mock from v11.1.5 
to v12.6.0, which introduced breaking API changes. This PR updates the 
DatasetList tests to use the new API.
   
   ## Changes
   
   **API migrations (6 files, 318 insertions, 420 deletions):**
   
   | Old API (v11) | New API (v12) |
   |---------------|---------------|
   | `fetchMock.reset()` | `fetchMock.removeRoutes()` |
   | `fetchMock.resetHistory()` | `fetchMock.clearHistory()` |
   | `fetchMock.restore()` | `fetchMock.removeRoutes()` |
   | `fetchMock.calls(filter)` | `fetchMock.callHistory.calls(filter)` |
   | `call[0]` (url) | `call.url` |
   | `call[1]` (options) | `call.options` |
   | `{ overwriteRoutes: true }` | removed (option no longer exists) |
   | `<QueryParamProvider>` | `<QueryParamProvider 
adapter={ReactRouter5Adapter}>` |
   
   **Files modified:**
   - `DatasetList.testHelpers.tsx`
   - `DatasetList.test.tsx`
   - `DatasetList.behavior.test.tsx`
   - `DatasetList.listview.test.tsx`
   - `DatasetList.permissions.test.tsx`
   - `DatasetList.integration.test.tsx`
   
   ## Test plan
   
   - [x] `npm run build` passes (TypeScript compilation)
   - [x] Pre-commit hooks pass (type-checking, prettier, eslint, oxlint)
   - [ ] DatasetList tests pass
   
   🤖 Generated with [Claude Code](https://claude.ai/code)


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