clean up repo before each test suite

This commit is contained in:
Joao 2017-09-08 10:23:53 +02:00
parent 036f4913f6
commit 8b0c4113f5

View file

@ -8,6 +8,7 @@ import { SpectronClient } from './client';
import { NullScreenshot, IScreenshot, Screenshot } from '../helpers/screenshot';
import { Workbench } from '../areas/workbench/workbench';
import * as fs from 'fs';
import * as cp from 'child_process';
import * as path from 'path';
export const LATEST_PATH = process.env.VSCODE_PATH as string;
@ -77,6 +78,7 @@ export class SpectronApplication {
public async start(...args: string[]): Promise<any> {
await this.retrieveKeybindings();
cp.execSync('git checkout .', { cwd: WORKSPACE_PATH });
await this.startApplication(args);
await this.checkWindowReady();
await this.waitForWelcome();