mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
add more meaningful api tests
This commit is contained in:
@@ -6,12 +6,18 @@
|
||||
'use strict';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import {window, workspace} from 'vscode';
|
||||
import {workspace, window} from 'vscode';
|
||||
import {join} from 'path';
|
||||
|
||||
suite("window namespace texts", () => {
|
||||
|
||||
// test('open document fires event', (done) => {
|
||||
|
||||
// });
|
||||
suite("window namespace tests", () => {
|
||||
|
||||
test('active text editor', (done) => {
|
||||
workspace.openTextDocument(join(workspace.rootPath, './far.js')).then(doc => {
|
||||
return window.showTextDocument(doc).then((editor) => {
|
||||
const active = window.activeTextEditor;
|
||||
assert.ok(active);
|
||||
assert.equal(active.document.uri.fsPath, doc.uri.fsPath);
|
||||
});
|
||||
}).then(() => done(), (error) => done(error));
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user