refactor: make baseTimestamp optional in addItem and remove redundant calls (#16471)

This commit is contained in:
Sehoon Shon
2026-01-13 14:15:04 -05:00
committed by GitHub
parent aa52462550
commit 91fcca3b1c
30 changed files with 528 additions and 888 deletions
@@ -11,7 +11,7 @@ import {
MultiFolderTrustChoice,
type MultiFolderTrustDialogProps,
} from './MultiFolderTrustDialog.js';
import { vi } from 'vitest';
import { vi, describe, it, expect, beforeEach } from 'vitest';
import {
TrustLevel,
type LoadedTrustedFolders,
@@ -213,13 +213,10 @@ describe('MultiFolderTrustDialog', () => {
onSelect(MultiFolderTrustChoice.YES);
});
expect(mockAddItem).toHaveBeenCalledWith(
{
type: MessageType.ERROR,
text: 'Configuration is not available.',
},
expect.any(Number),
);
expect(mockAddItem).toHaveBeenCalledWith({
type: MessageType.ERROR,
text: 'Configuration is not available.',
});
expect(mockOnComplete).toHaveBeenCalled();
expect(mockFinishAddingDirectories).not.toHaveBeenCalled();
});