Most appropriate sub-area of p5.js?
p5.js version
current main (5743cb5)
Web browser and version
N/A — test coverage gap, not a runtime bug
Operating system
N/A — same reason
Steps to reproduce this
isLooping() (src/core/structure.js) returns the internal _loop flag and is
documented in its JSDoc as supported usage — but its return value is never
tested. There are currently zero references to isLooping anywhere under
test/; the existing loop()/noLoop() suite in
test/unit/core/structure.js asserts only on frameCount behavior and never
calls isLooping().
Proposed tests (test-only, no source changes):
isLooping() returns true by default while the draw loop is running
- returns
false after noLoop()
- returns
true again after a subsequent loop()
I'd like to fix this myself if approved.
Most appropriate sub-area of p5.js?
p5.js version
current main (5743cb5)
Web browser and version
N/A — test coverage gap, not a runtime bug
Operating system
N/A — same reason
Steps to reproduce this
isLooping()(src/core/structure.js) returns the internal_loopflag and isdocumented in its JSDoc as supported usage — but its return value is never
tested. There are currently zero references to
isLoopinganywhere undertest/; the existingloop()/noLoop()suite intest/unit/core/structure.jsasserts only onframeCountbehavior and nevercalls
isLooping().Proposed tests (test-only, no source changes):
isLooping()returnstrueby default while the draw loop is runningfalseafternoLoop()trueagain after a subsequentloop()I'd like to fix this myself if approved.