Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions presto-ui/src/components/PageTitle.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ describe("PageTitle", () => {
jest.clearAllMocks();
jest.useFakeTimers();

// Deleting the existing location property before redefining
// For Latest Jest upgrade(30.3.0) that has stricter property handling
delete (window as any).location;

// Mock window.location using Object.defineProperty for better type safety
// Currently only mocking 'protocol' as that's all the component checks
// Add other properties (href, hostname, pathname, etc.) if component needs them
Expand Down Expand Up @@ -188,5 +192,3 @@ describe("PageTitle", () => {
});
});
});

// Made with Bob
4 changes: 2 additions & 2 deletions presto-ui/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"html-inline-script-webpack-plugin": "^3.2.1",
"html-webpack-plugin": "^5.6.6",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest": "^30.3.0",
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
"jest-environment-jsdom": "^30.3.0",
"jquery": "4.0.0",
"prettier": "^3.6.2",
"style-loader": "^4.0.0",
Expand Down
Loading
Loading