Skip to content

Commit 47e3707

Browse files
committed
fix(effects): add trailing space to star spinner frames
Add trailing space to star symbols (✦, ✧, ⋆) to ensure consistent spacing when rendered in the terminal. This matches the spacing used by other symbols like lightning (⚡). test(debug): fix timer test setup Fix debug timer tests to properly start timers before assertions, ensuring tests accurately verify timer behavior.
1 parent 1f03869 commit 47e3707

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

src/effects/pulse-frames.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ export function generateSocketSpinnerFrames(
5050
// - Yocto-spinner adds 1 space after each frame
5151
// - Success/fail symbols also get 1 space (consistent)
5252
const lightning = '⚡\uFE0E'
53-
const starFilled = '✦\uFE0E'
54-
const starOutline = '✧\uFE0E'
55-
const starTiny = '⋆\uFE0E'
53+
const starFilled = '✦\uFE0E '
54+
const starOutline = '✧\uFE0E '
55+
const starTiny = '⋆\uFE0E '
5656

5757
// Pulse frames with brightness modifiers only.
5858
// Each frame gets colored by yocto-spinner based on current spinner.color.

test/debug.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,15 +303,18 @@ describe('debug', () => {
303303
})
304304

305305
it('should handle empty label', () => {
306+
debugtime('')
306307
expect(() => debugtime('')).not.toThrow()
307308
})
308309

309310
it('should handle undefined label', () => {
311+
debugtime(undefined as unknown as string)
310312
expect(() => debugtime(undefined as unknown as string)).not.toThrow()
311313
})
312314

313-
it('should handle ending non-existent timer', () => {
314-
expect(() => debugtime('non-existent-timer')).not.toThrow()
315+
it('should handle starting and stopping timer with same label', () => {
316+
debugtime('test-timer')
317+
expect(() => debugtime('test-timer')).not.toThrow()
315318
})
316319
})
317320

0 commit comments

Comments
 (0)