Run over clean extensions directory for data migration tests. Fixes #27537.

This commit is contained in:
Michel Kaporin
2017-05-30 14:47:40 +02:00
parent 5199dddb6f
commit 7a7965a93e
2 changed files with 12 additions and 9 deletions

View File

@@ -5,7 +5,7 @@
import * as assert from 'assert';
import { SpectronApplication, USER_DIR, STABLE_PATH, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application";
import { SpectronApplication, USER_DIR, STABLE_PATH, LATEST_PATH, WORKSPACE_PATH, EXTENSIONS_DIR } from "../spectron/application";
import { CommonActions } from '../areas/common';
let app: SpectronApplication;
@@ -20,11 +20,12 @@ export function testDataMigration() {
afterEach(async function () {
await app.stop();
return await common.removeDirectory(USER_DIR)
await common.removeDirectory(USER_DIR);
return await common.removeDirectory(EXTENSIONS_DIR);
});
function setupSpectron(context: Mocha.ITestCallbackContext, appPath: string, workspace?: string[]): void {
app = new SpectronApplication(appPath, context.test.fullTitle(), context.test.currentRetry(), workspace, [`--user-data-dir=${USER_DIR}`]);
app = new SpectronApplication(appPath, context.test.fullTitle(), context.test.currentRetry(), workspace, [`--user-data-dir=${USER_DIR}`, `--extensions-dir=${EXTENSIONS_DIR}`]);
common = new CommonActions(app);
}