From 1b422c552a73a6ca8e3c47885bc9fe57b3c04249 Mon Sep 17 00:00:00 2001 From: patcher99 Date: Sun, 24 Mar 2024 13:57:14 +0530 Subject: [PATCH] update anthropic tests --- tests/anthropic.test.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/anthropic.test.mjs b/tests/anthropic.test.mjs index 859f873..6faa6c4 100644 --- a/tests/anthropic.test.mjs +++ b/tests/anthropic.test.mjs @@ -18,8 +18,8 @@ describe('Anthropic Test', () => { }); expect(message.type).to.equal('message'); } catch (error) { - if (error.type === 'rate_limit_error') { - console.error(`Daily Rate limit Reached`); + if (typeof error.message === 'string' && error.message.includes('rate limit')) { + console.error("Daily Rate limit Reached"); } } }).timeout(30000); @@ -42,8 +42,8 @@ describe('Anthropic Test', () => { } } } catch (error) { - if (error.type === 'rate_limit_error') { - console.error(`Daily Rate limit Reached`); + if (typeof error.message === 'string' && error.message.includes('rate limit')) { + console.error("Daily Rate limit Reached"); } } }).timeout(30000);