Skip to content

Commit ffc2147

Browse files
committed
add missing changes to test
1 parent d625b55 commit ffc2147

1 file changed

Lines changed: 0 additions & 50 deletions

File tree

extensions/vscode-api-tests/src/workspace.test.ts

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -188,56 +188,6 @@ suite('workspace-namespace', () => {
188188
});
189189
});
190190

191-
test('registerTextDocumentContentProvider, open/close document 1/2', function() {
192-
193-
let registration = workspace.registerTextDocumentContentProvider('foo', {
194-
provideTextDocumentContent(uri) {
195-
return 'I am virtual';
196-
}
197-
});
198-
199-
const uri = Uri.parse('foo://testing/path');
200-
201-
return workspace.openTextDocument(uri).then(doc => {
202-
203-
assert.ok(workspace.textDocuments.some(doc => doc.uri.toString() === uri.toString()));
204-
205-
return workspace.closeTextDocument(doc).then(value => {
206-
assert.ok(value);
207-
assert.ok(!workspace.textDocuments.some(doc => doc.uri.toString() === uri.toString()));
208-
registration.dispose();
209-
});
210-
});
211-
});
212-
213-
test('registerTextDocumentContentProvider, open/close document 2/2', function() {
214-
215-
let registration = workspace.registerTextDocumentContentProvider('foo', {
216-
provideTextDocumentContent(uri) {
217-
return 'I am virtual';
218-
}
219-
});
220-
221-
const uri = Uri.parse('foo://testing/path');
222-
223-
return workspace.openTextDocument(uri).then(first => {
224-
225-
assert.ok(workspace.textDocuments.some(doc => doc.uri.toString() === uri.toString()));
226-
227-
return workspace.openTextDocument(uri).then(second => {
228-
registration.dispose();
229-
assert.ok(first === second);
230-
231-
return workspace.closeTextDocument(first).then(value => {
232-
assert.ok(value);
233-
234-
// should we reference count or not?
235-
// assert.ok(workspace.textDocuments.some(doc => doc.uri.toString() === uri.toString()));
236-
});
237-
});
238-
});
239-
});
240-
241191
test('registerTextDocumentContentProvider, open/open document', function() {
242192

243193
let callCount = 0;

0 commit comments

Comments
 (0)