activate git before smoke tests

This commit is contained in:
Joao Moreno
2020-02-05 15:02:59 +01:00
parent e297e748d7
commit dde577b23e
4 changed files with 3 additions and 17 deletions

View File

@@ -49,8 +49,9 @@ suite('git smoke test', function () {
cp.execSync('git commit -m "initial commit"', { cwd });
// make sure git is activated
await commands.executeCommand('git.activate');
git = extensions.getExtension<GitExtension>('vscode.git')!.exports.getAPI(1);
const ext = extensions.getExtension<GitExtension>('vscode.git');
await ext?.activate();
git = ext!.exports.getAPI(1);
if (git.repositories.length === 0) {
await eventToPromise(git.onDidOpenRepository);