This commit is contained in:
rebornix
2020-05-13 12:47:39 -07:00
parent e2785c3297
commit 03acd2250a
7 changed files with 57 additions and 7 deletions

View File

@@ -321,6 +321,19 @@ suite('notebook working copy', () => {
});
});
suite('metadata', () => {
test('custom metadata should be supported', async function () {
const resource = vscode.Uri.parse(join(vscode.workspace.rootPath || '', './first.vsctestnb'));
await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest');
await waitFor(500);
assert.equal(vscode.notebook.activeNotebookEditor !== undefined, true, 'notebook first');
assert.equal(vscode.notebook.activeNotebookEditor!.document.metadata.custom['testMetadata'] as boolean, false);
assert.equal(vscode.notebook.activeNotebookEditor!.selection?.metadata.custom['testCellMetadata'] as boolean, true);
assert.equal(vscode.notebook.activeNotebookEditor!.selection?.language, 'typescript');
});
});
suite('regression', () => {
test('microsoft/vscode-github-issue-notebooks#26. Insert template cell in the new empty document', async function () {
const resource = vscode.Uri.parse(join(vscode.workspace.rootPath || '', './empty.vsctestnb'));