mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fix build break due to rename of APIs prior to checkin of unit tests (#3418)
This commit is contained in:
@@ -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<void> {
|
||||
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<void> {
|
||||
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<void> {
|
||||
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<void> {
|
||||
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<void> {
|
||||
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<void> {
|
||||
let cellData: nb.ICell = {
|
||||
let cellData: nb.ICellContents = {
|
||||
cell_type: CellTypes.Code,
|
||||
source: 'print(\'1\')',
|
||||
metadata: { language: 'python'},
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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<void> {
|
||||
// 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user