add more meaningful api tests

This commit is contained in:
Benjamin Pasero
2015-11-25 08:44:13 +01:00
parent 8a0f53baa4
commit 4ea2714df8
6 changed files with 156 additions and 19 deletions

View File

@@ -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));
});
});