Skip to content

NotificationsCenter

center

To open the notifications center, use either Workbench or StatusBar object:

import { Workbench, StatusBar, NotificationType } from 'vscode-extension-tester';
...
center = await new Workbench().openNotificationsCenter();
center1 = await new StatusBar().openNotificationsCenter();
// get all notifications
const notifications = await center.getNotifications(NotificationType.Any);
// get info notifications
const infos = await center.getNotifications(NotificationType.Info);
// clear all notifications
await center.clearAllNotifications();
// close the notifications center
await center.close();