fix(tests): Fix Firebase Studio to IDE detection tests (#7163)

This commit is contained in:
David East
2025-08-27 13:31:59 -04:00
committed by GitHub
parent a33293ac60
commit 023053ed92
3 changed files with 8 additions and 8 deletions

View File

@@ -62,12 +62,6 @@ describe('detectIde', () => {
expect(detectIde(ideProcessInfo)).toBe(DetectedIde.Trae);
});
it('should detect Firebase Studio via FIREBASE_DEPLOY_AGENT', () => {
vi.stubEnv('TERM_PROGRAM', 'vscode');
vi.stubEnv('FIREBASE_DEPLOY_AGENT', 'true');
expect(detectIde(ideProcessInfo)).toBe(DetectedIde.FirebaseStudio);
});
it('should detect Firebase Studio via MONOSPACE_ENV', () => {
vi.stubEnv('TERM_PROGRAM', 'vscode');
vi.stubEnv('MONOSPACE_ENV', 'true');
@@ -76,11 +70,13 @@ describe('detectIde', () => {
it('should detect VSCode when no other IDE is detected and command includes "code"', () => {
vi.stubEnv('TERM_PROGRAM', 'vscode');
vi.stubEnv('MONOSPACE_ENV', '');
expect(detectIde(ideProcessInfo)).toBe(DetectedIde.VSCode);
});
it('should detect VSCodeFork when no other IDE is detected and command does not include "code"', () => {
vi.stubEnv('TERM_PROGRAM', 'vscode');
vi.stubEnv('MONOSPACE_ENV', '');
expect(detectIde(ideProcessInfoNoCode)).toBe(DetectedIde.VSCodeFork);
});

View File

@@ -85,7 +85,7 @@ export function detectIdeFromEnv(): DetectedIde {
if (process.env['TERM_PRODUCT'] === 'Trae') {
return DetectedIde.Trae;
}
if (process.env['FIREBASE_DEPLOY_AGENT'] || process.env['MONOSPACE_ENV']) {
if (process.env['MONOSPACE_ENV']) {
return DetectedIde.FirebaseStudio;
}
return DetectedIde.VSCode;