Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ describe('AbortController and Process Lifecycle (E2E)', () => {
options: {
...SHARED_TEST_OPTIONS,
cwd: testDir,
debug: true,
stderr: (msg: string) => {
stderrMessages.push(msg);
},
Expand Down
19 changes: 5 additions & 14 deletions integration-tests/sdk-typescript/configuration-options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ describe('Configuration Options (E2E)', () => {
options: {
...SHARED_TEST_OPTIONS,
cwd: testDir,
debug: true, // Would normally enable debug logging
logLevel: 'error', // But logLevel should take precedence
debug: true,
logLevel: 'error',
stderr: (msg: string) => {
stderrMessages.push(msg);
},
Expand Down Expand Up @@ -333,7 +333,6 @@ describe('Configuration Options (E2E)', () => {
// Common model-related env vars that CLI might respect
OPENAI_API_KEY: process.env['OPENAI_API_KEY'] || 'test-key',
},
debug: true,
stderr: (msg: string) => {
stderrMessages.push(msg);
},
Expand Down Expand Up @@ -452,8 +451,6 @@ describe('Configuration Options (E2E)', () => {
...SHARED_TEST_OPTIONS,
cwd: testDir,
authType: 'qwen-oauth',
debug: true,
logLevel: 'debug',
stderr: (msg: string) => {
stderrMessages.push(msg);
},
Expand Down Expand Up @@ -527,7 +524,6 @@ describe('Configuration Options (E2E)', () => {
...SHARED_TEST_OPTIONS,
cwd: testDir,
authType: 'openai',
debug: true,
stderr: (msg: string) => {
stderrMessages.push(msg);
},
Expand Down Expand Up @@ -555,20 +551,18 @@ describe('Configuration Options (E2E)', () => {
});

describe('Combined Options', () => {
it('should work with logLevel, env, and authType together', async () => {
it('should work with env and authType together', async () => {
const stderrMessages: string[] = [];

const q = query({
prompt: 'What is 3 + 3? Just the number.',
options: {
...SHARED_TEST_OPTIONS,
cwd: testDir,
logLevel: 'debug',
env: {
COMBINED_TEST_VAR: 'combined_value',
},
authType: 'openai',
debug: true,
stderr: (msg: string) => {
stderrMessages.push(msg);
},
Expand All @@ -587,27 +581,24 @@ describe('Configuration Options (E2E)', () => {
}
}

// All three options should work together
expect(stderrMessages.length).toBeGreaterThan(0); // logLevel: debug produces logs
// Both options should work together
expect(assistantText).toMatch(/6/); // Query should work
assertSuccessfulCompletion(messages);
} finally {
await q.close();
}
});

it('should maintain system message consistency with all options', async () => {
it('should maintain system message consistency with options', async () => {
const q = query({
prompt: 'Hello',
options: {
...SHARED_TEST_OPTIONS,
cwd: testDir,
logLevel: 'info',
env: {
SYSTEM_MSG_TEST: 'test',
},
authType: 'openai',
debug: false,
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ describe('Permission Control (E2E)', () => {
...SHARED_TEST_OPTIONS,
cwd: testDir,
permissionMode: 'default',
debug: true,
},
});

Expand Down
10 changes: 1 addition & 9 deletions integration-tests/sdk-typescript/session-id.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ describe('Session ID Support (E2E)', () => {
...SHARED_TEST_OPTIONS,
cwd: testDir,
sessionId: customSessionId,
debug: false,
},
});

Expand Down Expand Up @@ -77,7 +76,6 @@ describe('Session ID Support (E2E)', () => {
...SHARED_TEST_OPTIONS,
cwd: testDir,
sessionId: customSessionId,
debug: false,
},
});

Expand Down Expand Up @@ -120,6 +118,7 @@ describe('Session ID Support (E2E)', () => {
try {
for await (const _message of q) {
// Consume all messages
console.log(_message);
}

// Verify that CLI was spawned with --session-id argument
Expand All @@ -144,7 +143,6 @@ describe('Session ID Support (E2E)', () => {
options: {
...SHARED_TEST_OPTIONS,
cwd: testDir,
debug: false,
},
});

Expand Down Expand Up @@ -181,7 +179,6 @@ describe('Session ID Support (E2E)', () => {
cwd: testDir,
sessionId: customSessionId,
resume: resumeSessionId,
debug: false,
},
});

Expand Down Expand Up @@ -297,7 +294,6 @@ describe('Session ID Support (E2E)', () => {
...SHARED_TEST_OPTIONS,
cwd: testDir,
sessionId: uuid,
debug: false,
},
});

Expand Down Expand Up @@ -351,7 +347,6 @@ describe('Session ID Support (E2E)', () => {
...SHARED_TEST_OPTIONS,
cwd: testDir,
sessionId: customSessionId,
debug: false,
},
});

Expand Down Expand Up @@ -505,7 +500,6 @@ describe('Session ID Support (E2E)', () => {
...SHARED_TEST_OPTIONS,
cwd: testDir,
sessionId: customSessionId,
debug: false,
},
});

Expand Down Expand Up @@ -536,7 +530,6 @@ describe('Session ID Support (E2E)', () => {
options: {
...SHARED_TEST_OPTIONS,
cwd: testDir,
debug: false,
},
});

Expand All @@ -545,7 +538,6 @@ describe('Session ID Support (E2E)', () => {
options: {
...SHARED_TEST_OPTIONS,
cwd: testDir,
debug: false,
},
});

Expand Down
2 changes: 0 additions & 2 deletions integration-tests/sdk-typescript/single-turn.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ describe('Single-Turn Query (E2E)', () => {
options: {
...SHARED_TEST_OPTIONS,
cwd: testDir,
debug: true,
},
});

Expand Down Expand Up @@ -292,7 +291,6 @@ describe('Single-Turn Query (E2E)', () => {
options: {
...SHARED_TEST_OPTIONS,
cwd: testDir,
debug: true,
stderr: (msg: string) => {
stderrMessages.push(msg);
},
Expand Down
1 change: 0 additions & 1 deletion integration-tests/sdk-typescript/subagents.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ OTHER AGENTS CANNOT:
...SHARED_TEST_OPTIONS,
cwd: testWorkDir,
agents: [testAgent],
debug: true,
stderr: (msg: string) => {
stderrMessages.push(msg);
},
Expand Down
Loading
Loading