mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 01:25:36 -05:00
Add a few more notebook model unit tests (#9859)
* Add a few more notebook model tests * Add tests for nb managers, active cell * Add assert messages
This commit is contained in:
@@ -396,6 +396,9 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
let index = firstIndex(this._cells, (cell) => cell.equals(cellModel));
|
||||
if (index > -1) {
|
||||
this._cells.splice(index, 1);
|
||||
if (this._activeCell === cellModel) {
|
||||
this.updateActiveCell(undefined);
|
||||
}
|
||||
this._contentChangedEmitter.fire({
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
cells: [cellModel],
|
||||
@@ -434,10 +437,6 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
return this._activeCell;
|
||||
}
|
||||
|
||||
public set activeCell(cell: ICellModel) {
|
||||
this._activeCell = cell;
|
||||
}
|
||||
|
||||
private notifyError(error: string): void {
|
||||
this._onErrorEmitter.fire({ message: error, severity: Severity.Error });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user