提交 c8928f81 编写于 作者: R rebornix

status bar test suite setup.

上级 f05512d8
......@@ -1136,13 +1136,26 @@ suite('Notebook API tests', function () {
suite('statusbar', () => {
const emitter = new vscode.EventEmitter<vscode.NotebookCell>();
const onDidCallProvide = emitter.event;
const suiteDisposables: vscode.Disposable[] = [];
suiteTeardown(async function () {
assertNoRpc();
await revertAllDirty();
await closeAllEditors();
disposeAll(suiteDisposables);
suiteDisposables.length = 0;
});
suiteSetup(() => {
vscode.notebooks.registerNotebookCellStatusBarItemProvider('notebookCoreTest', {
suiteDisposables.push(vscode.notebooks.registerNotebookCellStatusBarItemProvider('notebookCoreTest', {
async provideCellStatusBarItems(cell: vscode.NotebookCell, _token: vscode.CancellationToken): Promise<vscode.NotebookCellStatusBarItem[]> {
emitter.fire(cell);
return [];
}
});
}));
suiteDisposables.push(vscode.workspace.registerNotebookContentProvider('notebookCoreTest', apiTestContentProvider));
});
test('provideCellStatusBarItems called on metadata change', async function () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册