Skip to content

Replace parseFloat with Number.parseFloat in E2E tests - #682

Merged
manusa merged 2 commits into
mainfrom
copilot/fix-e2e-test-number-parsefloat
Nov 6, 2025
Merged

manusa merged 2 commits into
mainfrom
copilot/fix-e2e-test-number-parsefloat

Conversation

Copilot AI commented Nov 5, 2025 •

Copy link
Copy Markdown
Contributor

Sonar flagged usage of global parseFloat instead of Number.parseFloat at lines 311 and 338 in src/__tests__/task-manager.test.e2e.js.

Changes

  • Replaced parseFloat(opacity) with Number.parseFloat(opacity) in two test assertions
- expect(parseFloat(opacity)).toBe(0.38);
+ expect(Number.parseFloat(opacity)).toBe(0.38);
- expect(parseFloat(opacity)).toBe(1);
+ expect(Number.parseFloat(opacity)).toBe(1);
Original prompt

Sonar has reported some issues in:
src/tests/task-manager.test.e2e.js

The issue is:
Prefer Number.parseFloat over parseFloat.

The problem is in multiple lines: L311 L338


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: manusa <488391+manusa@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix prefer number.parseFloat over parseFloat in tests Replace parseFloat with Number.parseFloat in E2E tests Nov 5, 2025
Copilot AI requested a review from manusa November 5, 2025 10:14
@manusa manusa added this to the 0.1.0 milestone Nov 6, 2025
@manusa
manusa marked this pull request as ready for review November 6, 2025 05:45
@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2025

Copy link
Copy Markdown

@manusa
manusa merged commit c9891b0 into main Nov 6, 2025
13 of 14 checks passed
@manusa
manusa deleted the copilot/fix-e2e-test-number-parsefloat branch November 6, 2025 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants