Commit 26f692d
committed
test(logo): deduplicate setup, drop internal-state assertions, nest describes
- Extract setupLogoEnv() helper to eliminate repeated 6-line beforeEach
boilerplate (jest.clearAllMocks + globals + window/document patches)
across all 22 describe blocks; parameterised with withFlute flag for
the describe blocks that need instrument data populated.
- Remove assertions on private transport/scheduling fields that test
implementation rather than observable behaviour: _transportEventId,
_transportTime, delayParameters (runFromBlock Transport path and
clearTurtleRun Transport path), delayTimeout (clearTurtleRun timeout
path), _transportTime/_transportEventId (doStopTurtles Transport path),
and _ignoringBlock (runLogoCommands already-running path). Tests now
verify the externally observable outcome (correct callbacks fired,
correct args passed) without coupling to internal cleanup state.
- Break large flat describe blocks into nested groups:
Logo runFromBlock: step-mode / timeout / Transport scheduling
Logo runFromBlockNow: flow block execution / limits and plugin
dispatch / profiling / completion callbacks
Logo parseArg: value resolution / block type branches /
error and edge cases / plugin integration
Signed-off-by: Vanshika <pahalvanshikaa@gmail.com>1 parent 21957a6 commit 26f692d
1 file changed
Lines changed: 357 additions & 445 deletions
0 commit comments