Skip to content

Commit

Permalink
Merge branch 'chore/refactor-e2e-test' of github.com:SAP/ai-sdk-js in…
Browse files Browse the repository at this point in the history
…to chore/refactor-e2e-test
  • Loading branch information
MatKuhr committed Aug 5, 2024
2 parents f444674 + bc4e0d5 commit 6146cde
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions tests/e2e-tests/src/ai-core.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ import 'dotenv/config';

describe('ai-core', () => {
test.skip('should get deployments, but is currently broken', async () => {
const d = await getAiCoreDestination() as HttpDestination;
const deployments = await DeploymentApi.deploymentQuery({}, {"AI-Resource-Group": "default"} ).execute(d);
const d = (await getAiCoreDestination()) as HttpDestination;
const deployments = await DeploymentApi.deploymentQuery(
{},
{ 'AI-Resource-Group': 'default' }
).execute(d);
expect(deployments).toBeDefined();
});
});
7 changes: 5 additions & 2 deletions tests/e2e-tests/src/orchestration.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { GenAiHubClient, GenAiHubCompletionParameters } from '@sap-ai-sdk/gen-ai-hub';
import {
GenAiHubClient,
GenAiHubCompletionParameters
} from '@sap-ai-sdk/gen-ai-hub';
import 'dotenv/config';

describe('orchestration', () => {
Expand All @@ -14,7 +17,7 @@ describe('orchestration', () => {
}
};
const response = await new GenAiHubClient().chatCompletion(request);

expect(response.module_results).toBeDefined();
expect(response.orchestration_result.choices).not.toHaveLength(0);
});
Expand Down

0 comments on commit 6146cde

Please sign in to comment.