Open Issues Need Help
View All on GitHubAI Summary: The task involves fixing a bug in a React/TypeScript running tracker application where the stats page displays 'NaNm NaNs' due to improper handling of NaN values in duration calculations. This requires updating the `formatDuration` function to handle NaN, null, and undefined inputs, adding safe calculation helpers, and updating affected components to use these safe calculations. Thorough testing is needed to ensure all edge cases are covered and the issue is resolved.
AI Summary: Update the error handler in a Node.js/Express.js backend to use the modern `req.socket.remoteAddress` API instead of the deprecated `req.connection.remoteAddress`. This involves a simple code change, updating tests, and potentially adding documentation. The goal is to improve compatibility with newer Node.js versions and maintain code quality.
AI Summary: The task involves fixing a failing test suite in a full-stack React/Express application. This requires addressing issues with API mocking inconsistencies, React state updates, and test setup problems. The solution includes standardizing mocking strategies, adding `act()` wrappers for React state updates, and improving test setup to handle asynchronous operations and prevent undefined responses. Remaining tests and components relying on the affected hooks also need to be updated.
AI Summary: Expand the integration test suite for a running tracker application to include comprehensive error handling tests for all statistics API endpoints. This involves identifying missing endpoints, writing new test cases to cover various error scenarios (unauthorized access, invalid parameters, database errors), and ensuring consistent error response formats across all endpoints. The existing error handling tests in `tests/integration/errorHandling.test.ts` should serve as a template.
AI Summary: Implement comprehensive unit tests for all utility functions (formatters, API fetch, notifications, goal analytics, milestone detection, and others) in a React/TypeScript/Express.js project, aiming for >90% test coverage, including edge cases, error handling, and performance testing. Documentation of mocking strategies and test updates are also required.
AI Summary: Implement missing and enhance existing date and pace formatting functions in a TypeScript file (`utils/formatters.ts`) for a React/Express running tracker application. This includes creating `formatDuration` and `calculatePace` functions, improving existing `formatDate` and `formatPace` functions as needed, ensuring consistent formatting, and adding TypeScript types and JSDoc documentation.