Description
10 integration tests for withSpinner and withSpinnerSync state restoration are currently marked as .todo() because they require full logger context which isn't available in the unit test environment.
Location
test/spinner.test.ts:20-230
Tests Needed
withSpinner (6 tests):
- Restore color after operation
- Restore color with named colors
- Restore shimmer state after operation
- Disable shimmer if it was disabled before
- Work without withOptions
- Restore state even if operation throws
withSpinnerSync (4 tests):
- Same patterns as above, sync versions
Root Cause
These tests call spinner.start() internally, which depends on logger internals (Symbol(logger.lastWasBlank)) that aren't properly initialized in unit tests.
Solution
Set up proper integration test infrastructure with:
- Full logger context initialization
- Proper stdout/stderr handling
- Complete spinner lifecycle support
Current Status
- Tests exist but marked as
.todo()
- Core spinner functionality is tested (basic tests pass)
- State restoration feature untested
- Test output shows:
4546 passed | 3 skipped | 10 todo
Priority
Low - Core functionality works, this is testing edge cases of state restoration in wrapper functions.
Description
10 integration tests for
withSpinnerandwithSpinnerSyncstate restoration are currently marked as.todo()because they require full logger context which isn't available in the unit test environment.Location
test/spinner.test.ts:20-230Tests Needed
withSpinner (6 tests):
withSpinnerSync (4 tests):
Root Cause
These tests call
spinner.start()internally, which depends on logger internals (Symbol(logger.lastWasBlank)) that aren't properly initialized in unit tests.Solution
Set up proper integration test infrastructure with:
Current Status
.todo()4546 passed | 3 skipped | 10 todoPriority
Low - Core functionality works, this is testing edge cases of state restoration in wrapper functions.