Skip to content

Commit 0973ed2

Browse files
committed
test: Update AI Code Agent tests for multi-provider support
1 parent 6268fb4 commit 0973ed2

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

test/aicode-agent.test.mjs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ describe('AI Code Agent Integration', function() {
3535
expect(content).to.include('repository_dispatch:');
3636
expect(content).to.include('types: [aicode]');
3737

38-
// Check it runs the agent
39-
expect(content).to.include('node .github/agent/agent.js');
38+
// Check it runs the agent (supports multiple providers now)
39+
expect(content).to.include('node --input-type=module .github/agent/agent.js');
4040

4141
// Check it runs tests
4242
expect(content).to.include('npm test');
@@ -53,14 +53,15 @@ describe('AI Code Agent Integration', function() {
5353

5454
const content = fs.readFileSync(agentPath, 'utf8');
5555

56-
// Check it imports required modules
57-
expect(content).to.include('import OpenAI from "openai"');
56+
// Check it imports required modules (supports multiple AI providers)
5857
expect(content).to.include('import { execSync } from "child_process"');
58+
// Check for multi-provider support (Claude, OpenAI, or Gemini)
59+
expect(content).to.match(/(@anthropic-ai\/sdk|@google\/generative-ai|openai|AI_PROVIDER)/);
5960

6061
// Check it has safety checks
6162
expect(content).to.include('webauthn-handler.js');
6263
expect(content).to.include('auth-handler.js');
63-
expect(content).to.include('SAFETY VIOLATION');
64+
expect(content).to.match(/Safety Violation|SAFETY VIOLATION/i);
6465

6566
// Check it validates diff format
6667
expect(content).to.include('diff --git');

0 commit comments

Comments
 (0)