mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
api tests - more use of promises in mocha
This commit is contained in:
@@ -14,12 +14,10 @@ import {join} from 'path';
|
||||
|
||||
suite("editor tests", () => {
|
||||
|
||||
teardown((done) => {
|
||||
cleanUp().then(() => done(), (error) => done(error));
|
||||
});
|
||||
teardown(cleanUp);
|
||||
|
||||
test('make edit', (done) => {
|
||||
createRandomFile().then(file => {
|
||||
test('make edit', () => {
|
||||
return createRandomFile().then(file => {
|
||||
return workspace.openTextDocument(file).then(doc => {
|
||||
return window.showTextDocument(doc).then((editor) => {
|
||||
return editor.edit((builder) => {
|
||||
@@ -38,6 +36,6 @@ suite("editor tests", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
}).then(() => done(), (error) => done(error));
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user