We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf1b031 commit 49461e1Copy full SHA for 49461e1
packages/ai/src/methods/chat-session.test.ts
@@ -25,6 +25,7 @@ import { ChatSession } from './chat-session';
25
import { ApiSettings } from '../types/internal';
26
import { VertexAIBackend } from '../backend';
27
import { fakeChromeAdapter } from '../../test-utils/get-fake-firebase-services';
28
+import { AIError } from '../errors';
29
30
use(sinonChai);
31
use(chaiAsPromised);
@@ -231,7 +232,9 @@ describe('ChatSession', () => {
231
232
try {
233
// This will throw since generateContentStream will reject immediately.
234
await chatSession.sendMessageStream('hello');
- } catch (_) {}
235
+ } catch (e) {
236
+ expect((e as unknown as any).name).to.equal('foo');
237
+ }
238
239
expect(consoleStub).to.not.have.been.called;
240
});
0 commit comments