diff --git a/src/sql/workbench/contrib/notebook/test/electron-browser/contentManagers.test.ts b/src/sql/workbench/contrib/notebook/test/electron-browser/contentManagers.test.ts index 0ef8ea925d..873835cb3b 100644 --- a/src/sql/workbench/contrib/notebook/test/electron-browser/contentManagers.test.ts +++ b/src/sql/workbench/contrib/notebook/test/electron-browser/contentManagers.test.ts @@ -131,4 +131,12 @@ suite('Local Content Manager', function (): void { let displayOutput = notebook.cells[0].outputs[0]; assert.equal(displayOutput.data['text/html'], '
'); }); + test('Should create a new empty notebook if content is undefined', async function (): Promise { + // verify that when loading content from an empty string or undefined, a new notebook is created. + let content = await contentManager.loadFromContentString(''); + assert.equal(content.cells.length, 0); + + content = await contentManager.loadFromContentString(undefined); + assert.equal(content.cells.length, 0); + }); });