提交 5f0ba23b 编写于 作者: J Johannes Rieken

add simple test for onDidChangeVisibleTextEditors, #643

上级 3ac84ba2
......@@ -45,6 +45,33 @@ suite('window namespace tests', () => {
});
});
test('editor, onDidChangeVisibleTextEditors', () => {
let eventCounter = 0;
let reg = window.onDidChangeVisibleTextEditors(editor => {
eventCounter += 1;
});
return workspace.openTextDocument(join(workspace.rootPath, './far.js')).then(doc => {
return window.showTextDocument(doc, ViewColumn.One).then(editor => {
assert.equal(eventCounter, 1);
return doc;
});
}).then(doc => {
return window.showTextDocument(doc, ViewColumn.Two).then(editor => {
assert.equal(eventCounter, 2);
return doc;
});
}).then(doc => {
return window.showTextDocument(doc, ViewColumn.Three).then(editor => {
assert.equal(eventCounter, 3);
return doc;
});
}).then(doc => {
reg.dispose();
});
});
test('editor, onDidChangeTextEditorViewColumn', () => {
let actualEvent: TextEditorViewColumnChangeEvent;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册