mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
better cleanup for api tests
This commit is contained in:
@@ -14,9 +14,7 @@ import * as os from 'os';
|
||||
|
||||
suite('workspace-namespace', () => {
|
||||
|
||||
teardown((done) => {
|
||||
cleanUp().then(() => done(), (error) => done(error));
|
||||
});
|
||||
teardown(cleanUp);
|
||||
|
||||
test('textDocuments', () => {
|
||||
assert.ok(Array.isArray(workspace.textDocuments));
|
||||
@@ -28,12 +26,9 @@ suite('workspace-namespace', () => {
|
||||
assert.throws(() => workspace.rootPath = 'farboo');
|
||||
});
|
||||
|
||||
test('openTextDocument', done => {
|
||||
workspace.openTextDocument(join(workspace.rootPath, './far.js')).then(doc => {
|
||||
test('openTextDocument', () => {
|
||||
return workspace.openTextDocument(join(workspace.rootPath, './far.js')).then(doc => {
|
||||
assert.ok(doc);
|
||||
done();
|
||||
}, err => {
|
||||
done(err);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user