Skip to content

Test Suite: Add unit tests for Turtle class (part of #5607)#5907

Merged
omsuneri merged 1 commit intosugarlabs:masterfrom
AdityaM-IITH:test-add-turtle-class-unit-tests
Feb 26, 2026
Merged

Test Suite: Add unit tests for Turtle class (part of #5607)#5907
omsuneri merged 1 commit intosugarlabs:masterfrom
AdityaM-IITH:test-add-turtle-class-unit-tests

Conversation

@AdityaM-IITH
Copy link
Contributor

Adds initial unit test coverage for the Turtle class in js/turtle.js,
which previously had 0% test coverage.

Part of the ongoing test suite effort referenced in #5607.

Tests cover:

  • blinking() — verifies correct boolean return based on _blinkFinished state
  • doWait(secs) — verifies millisecond conversion including decimals and string input
  • initTurtle(suppressOutput) — verifies correct initialization of 15 state variables
    including singer properties, timing values, and key signature defaults

Coverage: turtle.js statements increased from 0% to 34.15%

All 118 test suites passing locally.

@walterbender @omsuneri

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@omsuneri omsuneri merged commit 2fda20c into sugarlabs:master Feb 26, 2026
7 checks passed
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