Skip to content

Commit 2e1f384

Browse files
Merge pull request #530 from microsoft/feature/remove-axios-39065
chore: remove unused axios dependency from ContentProcessorWeb
2 parents 0798b57 + 60ae1c5 commit 2e1f384

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

src/ContentProcessorWeb/.github/instructions/code-quality.instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ You are performing a systematic code-quality pass on a TypeScript/React codebase
104104

105105
- **Group imports** in this order, separated by blank lines:
106106
1. React / React DOM
107-
2. Third-party libraries (`@fluentui/*`, `react-redux`, `axios`, `react-router-dom`, etc.)
107+
2. Third-party libraries (`@fluentui/*`, `react-redux`, `react-router-dom`, etc.)
108108
3. Internal modules — hooks, services, store, types
109109
4. Sibling / relative components
110110
5. Style imports (`.scss`, `.css`)

src/ContentProcessorWeb/.github/instructions/test-quality.instructions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Rules:
114114
| `describe` block | PascalCase component/function name | `describe('Header', …)` |
115115
| `it` block | starts with "should …" | `it('should show the logo', …)` |
116116
| Helper function | `create…` / `render…` / `mock…` | `createMockStore`, `renderHeader` |
117-
| Mock file | `__mocks__/<module>.ts` | `__mocks__/axios.ts` |
117+
| Mock file | `__mocks__/<module>.ts` | `__mocks__/httpUtility.ts` |
118118

119119
File naming must mirror the source module:
120120
```
@@ -139,7 +139,7 @@ Focus on UNIT-TESTABLE code — pure logic and isolated components:
139139

140140
**MEDIUM PRIORITY** (test with mocks):
141141
- **Components with Redux**: use `renderWithProviders` with a preloaded state
142-
- **Components with API calls**: mock `axios` / `httpUtility` to return controlled data
142+
- **Components with API calls**: mock `httpUtility` to return controlled data
143143
- **MSAL-protected components**: mock `useAuth` / `useMsal` hooks
144144
- **Components with router dependencies**: wrap in `<MemoryRouter>` with initial entries
145145

@@ -229,7 +229,7 @@ import '@testing-library/jest-dom';
229229

230230
Use these patterns in order of preference:
231231

232-
### a) `jest.mock` — module-level mocks (axios, services, MSAL)
232+
### a) `jest.mock` — module-level mocks (services, MSAL)
233233

234234
```ts
235235
jest.mock('../../Services/httpUtility', () => ({

src/ContentProcessorWeb/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"@fluentui/react-dialog": "^9.16.6",
1212
"@fluentui/react-icons": "^2.0.245",
1313
"@reduxjs/toolkit": "^2.11.2",
14-
"axios": "^1.13.5",
1514
"babel-preset-react-app": "^10.1.0",
1615
"contentprocessor_web": "file:",
1716
"cra-template-typescript": "1.3.0",

src/ContentProcessorWeb/pnpm-lock.yaml

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)