Skip to content

Commit dc0db13

Browse files
committed
fix: resolve CI/CD pipeline failures
- Fix TypeScript Storage mock implementation in setupTests.ts - Update CodeQL action from v2 to v3 in GitHub workflow - Add missing react-router-dom dependency for tests - Ensure complete Storage interface implementation with length and key properties
1 parent 845b4f5 commit dc0db13

4 files changed

Lines changed: 11 additions & 7 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162
output: 'trivy-results.sarif'
163163

164164
- name: Upload Trivy scan results to GitHub Security tab
165-
uses: github/codeql-action/upload-sarif@v2
165+
uses: github/codeql-action/upload-sarif@v3
166166
if: always()
167167
with:
168168
sarif_file: 'trivy-results.sarif'

‎client-ts/package-lock.json‎

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

‎client-ts/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"react-big-calendar": "^1.19.4",
2323
"react-calendar": "5.1.0",
2424
"react-dom": "19.0.0",
25-
"react-router-dom": "7.4.0",
25+
"react-router-dom": "^7.4.0",
2626
"react-scripts": "5.0.1",
2727
"react-toastify": "11.0.5",
2828
"typescript": "4.9.5",
@@ -73,7 +73,7 @@
7373
"@testing-library/react": "^16.3.0",
7474
"@testing-library/user-event": "^14.6.1",
7575
"@types/react-big-calendar": "^1.16.3",
76-
"@types/react-router-dom": "5.3.3",
76+
"@types/react-router-dom": "^5.3.3",
7777
"autoprefixer": "10.4.21",
7878
"cross-env": "10.0.0",
7979
"cypress": "^15.1.0",

‎client-ts/src/setupTests.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ const localStorageMock = {
2525
setItem: jest.fn(),
2626
removeItem: jest.fn(),
2727
clear: jest.fn(),
28-
};
28+
length: 0,
29+
key: jest.fn(),
30+
} as Storage;
2931
global.localStorage = localStorageMock;
3032

3133
// Mock sessionStorage
@@ -34,5 +36,7 @@ const sessionStorageMock = {
3436
setItem: jest.fn(),
3537
removeItem: jest.fn(),
3638
clear: jest.fn(),
37-
};
39+
length: 0,
40+
key: jest.fn(),
41+
} as Storage;
3842
global.sessionStorage = sessionStorageMock;

0 commit comments

Comments
 (0)