EnxDev commented on code in PR #32705: URL: https://github.com/apache/superset/pull/32705#discussion_r2021581621
########## superset-frontend/src/components/Timer/Timer.test.tsx: ########## @@ -53,17 +58,17 @@ describe('Timer', () => { screen.rerender(<Timer {...mockProps} isRunning={false} />); // the same node should still be in DOM and the content should not change expect(screen.getByRole('timer')).toBe(node); - expect(node).toHaveTextContent(text); + expect(formatTime(node.textContent || '')).toBe(formatTime(text)); // the timestamp should not change even after while await sleep(100); expect(screen.getByRole('timer')).toBe(node); - expect(node).toHaveTextContent(text); + expect(formatTime(node.textContent || '')).toBe(formatTime(text)); // should continue and start from stopped time screen.rerender(<Timer {...mockProps} isRunning />); expect(screen.getByRole('timer')).toBe(node); - expect(node).toHaveTextContent(text); + expect(formatTime(node.textContent || '')).toBe(formatTime(text)); Review Comment: The test was failing because there was a blank space, I have removed it from 'text' -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org