diff options
Diffstat (limited to 'extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts')
-rw-r--r-- | extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts index c120526ae14..462e3113698 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts @@ -1001,7 +1001,9 @@ suite('Notebook & LiveShare', function () { suiteDisposables.push(vscode.workspace.registerNotebookSerializer(notebookType, new class implements vscode.NotebookSerializer { deserializeNotebook(content: Uint8Array, _token: vscode.CancellationToken): vscode.NotebookData | Thenable<vscode.NotebookData> { const value = new TextDecoder().decode(content); - return new vscode.NotebookData([new vscode.NotebookCellData(vscode.NotebookCellKind.Code, value, 'fooLang')]); + const cell1 = new vscode.NotebookCellData(vscode.NotebookCellKind.Code, value, 'fooLang'); + cell1.outputs = [new vscode.NotebookCellOutput([vscode.NotebookCellOutputItem.stderr(value)])]; + return new vscode.NotebookData([cell1]); } serializeNotebook(data: vscode.NotebookData, _token: vscode.CancellationToken): Uint8Array | Thenable<Uint8Array> { return new TextEncoder().encode(data.cells[0].value); @@ -1030,6 +1032,7 @@ suite('Notebook & LiveShare', function () { assert.ok(data instanceof vscode.NotebookData); assert.strictEqual(data.cells.length, 1); assert.strictEqual(data.cells[0].value, value); + assert.strictEqual(new TextDecoder().decode(data.cells[0].outputs![0].items[0].data), value); }); test('command: vscode.executeNotebookToData', async function () { |