mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-08 01:28:26 -05:00
Merge from vscode 1fbacccbc900bb59ba8a8f26a4128d48a1c97842
This commit is contained in:
@@ -20,6 +20,7 @@ import { IUntitledTextEditorService } from 'vs/workbench/services/untitled/commo
|
||||
import { TextFileEditorModelManager } from 'vs/workbench/services/textfile/common/textFileEditorModelManager';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { timeout } from 'vs/base/common/async';
|
||||
import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput';
|
||||
|
||||
class ServiceAccessor {
|
||||
constructor(
|
||||
@@ -110,11 +111,13 @@ suite('Workbench - TextModelResolverService', () => {
|
||||
|
||||
test('resolve untitled', async () => {
|
||||
const service = accessor.untitledTextEditorService;
|
||||
const input = service.create();
|
||||
const untitledModel = service.create();
|
||||
const input = instantiationService.createInstance(UntitledTextEditorInput, untitledModel);
|
||||
|
||||
await input.resolve();
|
||||
const ref = await accessor.textModelResolverService.createModelReference(input.getResource());
|
||||
const model = ref.object;
|
||||
assert.equal(untitledModel, model);
|
||||
const editorModel = model.textEditorModel;
|
||||
assert.ok(editorModel);
|
||||
ref.dispose();
|
||||
|
||||
Reference in New Issue
Block a user