Commit 428e133
Fix/add unit testing coverage (#4032)
* chore: add test utilities and coverage infrastructure
- Update jest.config.js with coverage collection exclusions
- Add test-utils.tsx with renderWithProviders and createMockStore helpers
- Add @testing-library/jest-dom and @testing-library/react dev dependencies
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* test: add unit tests across all modules (1,900 tests, 95% coverage)
- 197 test suites covering utilities, Redux slices, async thunks,
middleware, React components, hooks, caches, and service modules
- Line coverage: 95.07% (5816/6117)
- Statement coverage: 95.03% (6063/6380)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: resolve TypeScript build errors and test failures in spec files
- Fix TS2344 in permissions-action-creator.util.spec.ts: cast
InstanceType<typeof RevokePermissionsUtil> to unknown as RevokePermissionsUtil
- Fix TS2345/TS2739/TS2571/TS2322/TS2352/TS2556/TS2769 across spec files:
cast sampleBody/payload as unknown as IQuery, add missing IPermissionGrant
fields (clientId/resourceId), fix status literal types, cast result.payload
as any, add missing PopupsComponent props, fix Provider overload
- Fix Auth test infinite useEffect loop: moved state object outside
mockImplementation so authToken reference is stable across re-renders
- Fix 13 ESLint errors introduced by fixes: wrap long lines in
permission-grants.slice.spec.ts and fix double-quotes + max-len in
ShareQuery.spec.tsx
- Add @babel/plugin-proposal-private-property-in-object to devDependencies
(suppress babel-preset-react-app warning)
- Centralize ResizeObserver mock in setupTests.ts
- Fix all 204 ESLint max-len/no-empty/quotes violations across ~60 spec files
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* revert
---------
Co-authored-by: aguzmancruz <aguzmancruz@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent a2f49ba commit 428e133
168 files changed
Lines changed: 23818 additions & 206 deletions
File tree
- src
- adaptivecards-templates
- app
- middleware
- services
- actions
- context
- collection-permissions
- popups-context
- validation-context
- hooks
- reducers
- slices
- utils
- error-utils
- resources
- views
- app-sections
- authentication
- auth-util-components
- profile
- common
- banners
- copy-button
- dimensions
- error-boundary
- image
- lazy-loader
- component-registry
- suspense-loader
- message-display
- monaco
- util
- popups
- submit-button
- layout
- main-header
- settings
- query-response
- adaptive-cards
- graph-toolkit
- headers
- pivot-items
- response
- snippets
- query-runner
- query-input
- auto-complete
- suffix
- suggestion-list
- request
- auth
- body
- feedback
- headers
- permissions
- sidebar
- history
- resource-explorer
- collection
- sample-queries
- sidebar-utils
- modules
- authentication
- cache
- suggestions
- utilities
- validation
- telemetry
- themes
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
0 commit comments