Skip to content

Commit 2facc35

Browse files
committed
chore: fix check
1 parent 20e985e commit 2facc35

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

packages/atlas-service/src/atlas-service.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const ATLAS_CONFIG = {
1515
issuer: 'http://example.com/oauth2/default',
1616
},
1717
authPortalUrl: 'http://example.com/account/login',
18+
assistantApiBaseUrl: 'http://example.com/assistant',
1819
};
1920

2021
function getAtlasService(

packages/atlas-service/src/main.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ describe('CompassAuthServiceMain', function () {
5656
clientId: '1234abcd',
5757
},
5858
authPortalUrl: 'http://example.com',
59+
assistantApiBaseUrl: 'http://example.com/assistant',
5960
};
6061

6162
const fetch = CompassAuthService['fetch'];

packages/compass-assistant/src/assistant-chat.spec.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ describe('AssistantChat', function () {
208208
role: 'assistant',
209209
parts: [
210210
{ type: 'text', text: 'This is text content.' },
211-
{ type: 'tool-call' as any, text: 'This should be filtered out.' },
211+
// @ts-expect-error - tool-call is not a valid part type
212+
{ type: 'tool-call', text: 'This should be filtered out.' },
212213
{ type: 'text', text: ' More text content.' },
213214
],
214215
},

packages/compass-assistant/src/index.spec.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import {
77
DrawerAnchor,
88
DrawerContentProvider,
99
} from '@mongodb-js/compass-components';
10+
import { Chat } from './@ai-sdk/react/chat-react';
11+
import type { AtlasService } from '@mongodb-js/atlas-service/provider';
1012

1113
describe('CompassAssistantProvider', function () {
1214
beforeEach(function () {
@@ -25,13 +27,13 @@ describe('CompassAssistantProvider', function () {
2527
};
2628

2729
const MockedProvider = CompassAssistantProvider.withMockServices({
28-
atlasService: mockAtlasService,
30+
atlasService: mockAtlasService as unknown as AtlasService,
2931
});
3032

3133
render(
3234
<DrawerContentProvider>
3335
<DrawerAnchor />
34-
<MockedProvider />
36+
<MockedProvider chat={new Chat({})} />
3537
</DrawerContentProvider>,
3638
{
3739
preferences: { enableAIAssistant: true },

0 commit comments

Comments
 (0)