feat(trash): telemetry 4 new kinds (trash/restore/permanent_delete/empty_trash) (#4 v0.2.3)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -146,7 +146,7 @@ describe('TelemetryService.readAllRecent', () => {
|
||||
const svc = new TelemetryService(dir, () => new Date('2026-05-01T12:00:00Z'), 14);
|
||||
const events = await svc.readAllRecent();
|
||||
expect(events).toHaveLength(3);
|
||||
expect(events.map((e) => e.payload.noteId)).toEqual(['a', 'b', 'b']);
|
||||
expect(events.map((e) => (e.payload as { noteId: string }).noteId)).toEqual(['a', 'b', 'b']);
|
||||
});
|
||||
|
||||
it('skips malformed lines (silent — invariant)', async () => {
|
||||
@@ -157,7 +157,7 @@ describe('TelemetryService.readAllRecent', () => {
|
||||
const svc = new TelemetryService(dir, () => new Date('2026-05-01T12:00:00Z'), 14);
|
||||
const events = await svc.readAllRecent();
|
||||
expect(events).toHaveLength(1);
|
||||
expect(events[0]!.payload.noteId).toBe('a');
|
||||
expect((events[0]!.payload as { noteId: string }).noteId).toBe('a');
|
||||
});
|
||||
|
||||
it('returns [] when dir missing', async () => {
|
||||
|
||||
Reference in New Issue
Block a user