mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 01:25:39 -05:00
Add Notebook Completion Item Provider Unit Tests (#11222)
* completion item provider tests * Add nb completionItemProvider tests
This commit is contained in:
@@ -20,6 +20,10 @@ describe('notebookUtils Tests', function (): void {
|
||||
let notebookUtils: NotebookUtils;
|
||||
let apiWrapperMock: TypeMoq.IMock<ApiWrapper>;
|
||||
|
||||
this.beforeAll(async function(): Promise<void> {
|
||||
await vscode.commands.executeCommand('workbench.action.closeAllEditors');
|
||||
});
|
||||
|
||||
beforeEach(function (): void {
|
||||
apiWrapperMock = TypeMoq.Mock.ofInstance(new ApiWrapper());
|
||||
notebookUtils = new NotebookUtils(apiWrapperMock.object);
|
||||
@@ -185,7 +189,7 @@ describe('notebookUtils Tests', function (): void {
|
||||
nodeSubType: undefined,
|
||||
nodeType: undefined
|
||||
}
|
||||
}
|
||||
};
|
||||
await notebookUtils.analyzeNotebook(oeContext);
|
||||
should(notebookEditor.document.cells.length).equal(1, 'One cell should exist');
|
||||
should(notebookEditor.document.cells[0].contents.cell_type).equal(CellTypes.Code, 'Cell was created with incorrect type');
|
||||
|
||||
Reference in New Issue
Block a user