mirror of
https://github.com/coder/code-server.git
synced 2026-05-05 20:15:19 +02:00
chore(vscode): update to 1.55.2
This commit is contained in:
@@ -11,10 +11,10 @@ suite('Notebook Document', function () {
|
||||
|
||||
const contentProvider = new class implements vscode.NotebookContentProvider {
|
||||
async openNotebook(uri: vscode.Uri, _openContext: vscode.NotebookDocumentOpenContext): Promise<vscode.NotebookData> {
|
||||
return {
|
||||
cells: [{ cellKind: vscode.NotebookCellKind.Code, source: uri.toString(), language: 'javascript', metadata: new vscode.NotebookCellMetadata(), outputs: [] }],
|
||||
metadata: new vscode.NotebookDocumentMetadata()
|
||||
};
|
||||
return new vscode.NotebookData(
|
||||
[new vscode.NotebookCellData(vscode.NotebookCellKind.Code, uri.toString(), 'javascript')],
|
||||
new vscode.NotebookDocumentMetadata()
|
||||
);
|
||||
}
|
||||
async resolveNotebook(_document: vscode.NotebookDocument, _webview: vscode.NotebookCommunication) {
|
||||
//
|
||||
@@ -100,11 +100,11 @@ suite('Notebook Document', function () {
|
||||
|
||||
const p = utils.asPromise(vscode.notebook.onDidOpenNotebookDocument).then(notebook => {
|
||||
for (let cell of notebook.cells) {
|
||||
const doc = vscode.workspace.textDocuments.find(doc => doc.uri.toString() === cell.uri.toString());
|
||||
const doc = vscode.workspace.textDocuments.find(doc => doc.uri.toString() === cell.document.uri.toString());
|
||||
assert.ok(doc);
|
||||
assert.strictEqual(doc.notebook === notebook, true);
|
||||
assert.strictEqual(doc === cell.document, true);
|
||||
assert.strictEqual(doc?.languageId, cell.language);
|
||||
assert.strictEqual(doc?.languageId, cell.document.languageId);
|
||||
assert.strictEqual(doc?.isDirty, false);
|
||||
assert.strictEqual(doc?.isClosed, false);
|
||||
}
|
||||
@@ -125,13 +125,13 @@ suite('Notebook Document', function () {
|
||||
{
|
||||
const edit = new vscode.WorkspaceEdit();
|
||||
edit.replaceNotebookCells(document.uri, 0, 0, [{
|
||||
cellKind: vscode.NotebookCellKind.Markdown,
|
||||
kind: vscode.NotebookCellKind.Markdown,
|
||||
language: 'markdown',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
source: 'new_markdown'
|
||||
}, {
|
||||
cellKind: vscode.NotebookCellKind.Code,
|
||||
kind: vscode.NotebookCellKind.Code,
|
||||
language: 'fooLang',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
@@ -162,13 +162,13 @@ suite('Notebook Document', function () {
|
||||
{
|
||||
const edit = new vscode.WorkspaceEdit();
|
||||
edit.replaceNotebookCells(document.uri, 0, 1, [{
|
||||
cellKind: vscode.NotebookCellKind.Markdown,
|
||||
kind: vscode.NotebookCellKind.Markdown,
|
||||
language: 'markdown',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
source: 'new2_markdown'
|
||||
}, {
|
||||
cellKind: vscode.NotebookCellKind.Code,
|
||||
kind: vscode.NotebookCellKind.Code,
|
||||
language: 'fooLang',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
@@ -198,13 +198,13 @@ suite('Notebook Document', function () {
|
||||
|
||||
const edit = new vscode.WorkspaceEdit();
|
||||
edit.replaceNotebookCells(document.uri, 0, 0, [{
|
||||
cellKind: vscode.NotebookCellKind.Markdown,
|
||||
kind: vscode.NotebookCellKind.Markdown,
|
||||
language: 'markdown',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
source: 'new_markdown'
|
||||
}, {
|
||||
cellKind: vscode.NotebookCellKind.Code,
|
||||
kind: vscode.NotebookCellKind.Code,
|
||||
language: 'fooLang',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
@@ -306,13 +306,13 @@ suite('Notebook Document', function () {
|
||||
|
||||
const edit = new vscode.WorkspaceEdit();
|
||||
edit.replaceNotebookCells(notebook.uri, 0, 0, [{
|
||||
cellKind: vscode.NotebookCellKind.Markdown,
|
||||
kind: vscode.NotebookCellKind.Markdown,
|
||||
language: 'markdown',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
source: 'new_markdown'
|
||||
}, {
|
||||
cellKind: vscode.NotebookCellKind.Code,
|
||||
kind: vscode.NotebookCellKind.Code,
|
||||
language: 'fooLang',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
@@ -344,8 +344,8 @@ suite('Notebook Document', function () {
|
||||
const closed = await pclose;
|
||||
const opened = await popen;
|
||||
|
||||
assert.strictEqual(closed.uri.toString(), first.uri.toString());
|
||||
assert.strictEqual(opened.uri.toString(), first.uri.toString());
|
||||
assert.strictEqual(closed.uri.toString(), first.document.uri.toString());
|
||||
assert.strictEqual(opened.uri.toString(), first.document.uri.toString());
|
||||
assert.strictEqual(opened === closed, true);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user