Skip to content

Commit 4c31f03

Browse files
committed
test: simplify
1 parent a568823 commit 4c31f03

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/notebooks/deepnote/deepnoteTreeDataProvider.unit.test.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,13 @@ suite('DeepnoteTreeDataProvider', () => {
9797
}
9898
});
9999

100-
test('should complete initial scan and show projects after loading', async () => {
100+
test('should return empty array when no workspace is available', async () => {
101101
const newProvider = new DeepnoteTreeDataProvider();
102-
const loadingChildren = await newProvider.getChildren();
103-
assert.isArray(loadingChildren);
104102

105-
await new Promise((resolve) => setTimeout(resolve, 10));
106-
107-
// Second call should show actual projects (or empty array if no projects)
108-
const actualChildren = await newProvider.getChildren();
109-
assert.isArray(actualChildren);
103+
// In test environment without workspace, returns empty array
104+
const children = await newProvider.getChildren();
105+
assert.isArray(children);
106+
assert.strictEqual(children.length, 0, 'Should return empty array when no workspace folders exist');
110107

111108
if (newProvider && typeof newProvider.dispose === 'function') {
112109
newProvider.dispose();

0 commit comments

Comments
 (0)