diff --git a/src/sqltest/parts/notebook/model/cell.test.ts b/src/sqltest/parts/notebook/model/cell.test.ts index 5136e4f695..b90298fbc5 100644 --- a/src/sqltest/parts/notebook/model/cell.test.ts +++ b/src/sqltest/parts/notebook/model/cell.test.ts @@ -39,7 +39,7 @@ describe('Cell Model', function (): void { text: 'Some output', name: 'stdout' }; - let cellData: nb.ICell = { + let cellData: nb.ICellContents = { cell_type: CellTypes.Markdown, source: 'some *markdown*', outputs: [output], @@ -56,7 +56,7 @@ describe('Cell Model', function (): void { it('Should set cell language to python if defined as python in languageInfo', async function (): Promise { - let cellData: nb.ICell = { + let cellData: nb.ICellContents = { cell_type: CellTypes.Code, source: 'print(\'1\')', metadata: { language: 'python'}, @@ -73,7 +73,7 @@ describe('Cell Model', function (): void { }); it('Should set cell language to python if defined as pyspark in languageInfo', async function (): Promise { - let cellData: nb.ICell = { + let cellData: nb.ICellContents = { cell_type: CellTypes.Code, source: 'print(\'1\')', metadata: { language: 'python'}, @@ -90,7 +90,7 @@ describe('Cell Model', function (): void { }); it('Should set cell language to scala if defined as scala in languageInfo', async function (): Promise { - let cellData: nb.ICell = { + let cellData: nb.ICellContents = { cell_type: CellTypes.Code, source: 'print(\'1\')', metadata: { language: 'python'}, @@ -107,7 +107,7 @@ describe('Cell Model', function (): void { }); it('Should set cell language to python if no language defined', async function (): Promise { - let cellData: nb.ICell = { + let cellData: nb.ICellContents = { cell_type: CellTypes.Code, source: 'print(\'1\')', metadata: { language: 'python'}, @@ -124,7 +124,7 @@ describe('Cell Model', function (): void { }); it('Should match cell language to language specified if unknown language defined in languageInfo', async function (): Promise { - let cellData: nb.ICell = { + let cellData: nb.ICellContents = { cell_type: CellTypes.Code, source: 'std::cout << "hello world";', metadata: { language: 'python'}, @@ -141,7 +141,7 @@ describe('Cell Model', function (): void { }); it('Should match cell language to mimetype name is not supplied in languageInfo', async function (): Promise { - let cellData: nb.ICell = { + let cellData: nb.ICellContents = { cell_type: CellTypes.Code, source: 'print(\'1\')', metadata: { language: 'python'}, diff --git a/src/sqltest/parts/notebook/model/contentManagers.test.ts b/src/sqltest/parts/notebook/model/contentManagers.test.ts index d5cc5de0a0..468aabce1a 100644 --- a/src/sqltest/parts/notebook/model/contentManagers.test.ts +++ b/src/sqltest/parts/notebook/model/contentManagers.test.ts @@ -16,7 +16,7 @@ import { LocalContentManager } from 'sql/services/notebook/localContentManager'; import * as testUtils from '../../../utils/testUtils'; import { CellTypes } from 'sql/parts/notebook/models/contracts'; -let expectedNotebookContent: nb.INotebook = { +let expectedNotebookContent: nb.INotebookContents = { cells: [{ cell_type: CellTypes.Code, source: 'insert into t1 values (c1, c2)', @@ -34,7 +34,7 @@ let expectedNotebookContent: nb.INotebook = { }; let notebookContentString = JSON.stringify(expectedNotebookContent); -function verifyMatchesExpectedNotebook(notebook: nb.INotebook): void { +function verifyMatchesExpectedNotebook(notebook: nb.INotebookContents): void { should(notebook.cells).have.length(1, 'Expected 1 cell'); should(notebook.cells[0].cell_type).equal(CellTypes.Code); should(notebook.cells[0].source).equal(expectedNotebookContent.cells[0].source); diff --git a/src/sqltest/parts/notebook/model/notebookModel.test.ts b/src/sqltest/parts/notebook/model/notebookModel.test.ts index 076c98088e..85748d8572 100644 --- a/src/sqltest/parts/notebook/model/notebookModel.test.ts +++ b/src/sqltest/parts/notebook/model/notebookModel.test.ts @@ -26,7 +26,7 @@ import { ConnectionManagementService } from 'sql/parts/connection/common/connect import { Memento } from 'vs/workbench/common/memento'; import { Emitter } from 'vs/base/common/event'; -let expectedNotebookContent: nb.INotebook = { +let expectedNotebookContent: nb.INotebookContents = { cells: [{ cell_type: CellTypes.Code, source: 'insert into t1 values (c1, c2)', @@ -48,7 +48,7 @@ let expectedNotebookContent: nb.INotebook = { nbformat_minor: 0 }; -let expectedNotebookContentOneCell: nb.INotebook = { +let expectedNotebookContentOneCell: nb.INotebookContents = { cells: [{ cell_type: CellTypes.Code, source: 'insert into t1 values (c1, c2)', @@ -104,7 +104,7 @@ describe('notebook model', function(): void { it('Should create single cell if model has no contents', async function(): Promise { // Given an empty notebook - let emptyNotebook: nb.INotebook = { + let emptyNotebook: nb.INotebookContents = { cells: [], metadata: { kernelspec: { @@ -243,7 +243,7 @@ describe('notebook model', function(): void { verifyCellModel(model.cells[0], { cell_type: CellTypes.Code, source: 'insert into t1 values (c1, c2)', metadata: { language: 'python' }, execution_count: 1 }); } - function verifyCellModel(cellModel: ICellModel, expected: nb.ICell): void { + function verifyCellModel(cellModel: ICellModel, expected: nb.ICellContents): void { should(cellModel.cellType).equal(expected.cell_type); should(cellModel.source).equal(expected.source); }