mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-20 18:14:29 -07:00
Disallow unnecessary awaits. (#15172)
This commit is contained in:
committed by
GitHub
parent
3e9a0a7628
commit
7f2d33458a
@@ -1424,9 +1424,10 @@ This extension will run the following MCP servers:
|
||||
],
|
||||
});
|
||||
|
||||
const previousExtensionConfig = extensionManager.loadExtensionConfig(
|
||||
path.join(userExtensionsDir, 'my-local-extension'),
|
||||
);
|
||||
const previousExtensionConfig =
|
||||
await extensionManager.loadExtensionConfig(
|
||||
path.join(userExtensionsDir, 'my-local-extension'),
|
||||
);
|
||||
mockPromptForSettings.mockResolvedValueOnce('new-setting-value');
|
||||
|
||||
// 3. Call installOrUpdateExtension to perform the update.
|
||||
@@ -1481,9 +1482,10 @@ This extension will run the following MCP servers:
|
||||
],
|
||||
});
|
||||
|
||||
const previousExtensionConfig = extensionManager.loadExtensionConfig(
|
||||
path.join(userExtensionsDir, 'my-auto-update-ext'),
|
||||
);
|
||||
const previousExtensionConfig =
|
||||
await extensionManager.loadExtensionConfig(
|
||||
path.join(userExtensionsDir, 'my-auto-update-ext'),
|
||||
);
|
||||
|
||||
// 3. Attempt to update and assert it fails
|
||||
await expect(
|
||||
@@ -1967,7 +1969,7 @@ This extension will run the following MCP servers:
|
||||
expect(activeExtensions).toHaveLength(0);
|
||||
|
||||
await extensionManager.enableExtension('ext1', SettingScope.User);
|
||||
activeExtensions = await getActiveExtensions();
|
||||
activeExtensions = getActiveExtensions();
|
||||
expect(activeExtensions).toHaveLength(1);
|
||||
expect(activeExtensions[0].name).toBe('ext1');
|
||||
});
|
||||
@@ -1984,7 +1986,7 @@ This extension will run the following MCP servers:
|
||||
expect(activeExtensions).toHaveLength(0);
|
||||
|
||||
await extensionManager.enableExtension('ext1', SettingScope.Workspace);
|
||||
activeExtensions = await getActiveExtensions();
|
||||
activeExtensions = getActiveExtensions();
|
||||
expect(activeExtensions).toHaveLength(1);
|
||||
expect(activeExtensions[0].name).toBe('ext1');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user