From 7715ffc9c4b4c5fff236b7b641ff447db566f287 Mon Sep 17 00:00:00 2001 From: Santiago Bosio Date: Fri, 27 Sep 2024 20:37:28 -0300 Subject: [PATCH] Fixing failing tests in CI --- test/commands/ai/models/call.test.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/commands/ai/models/call.test.ts b/test/commands/ai/models/call.test.ts index ed0d8e0..b531fd6 100644 --- a/test/commands/ai/models/call.test.ts +++ b/test/commands/ai/models/call.test.ts @@ -117,10 +117,8 @@ describe('ai:models:call', function () { ]) } catch (error: unknown) { const {message} = error as SyntaxError - expect(stripAnsi(message)).to.eq(heredoc` - Invalid JSON in model-options.json. Check the formatting in your file. - Unexpected token i in JSON at position 0 - `.trim()) + expect(stripAnsi(message)).to.contain('Invalid JSON in model-options.json. Check the formatting in your file.') + expect(stripAnsi(message)).to.contain('Unexpected token') } expect(readFileSyncMock.calledWith('model-options.json')).to.be.true @@ -172,10 +170,8 @@ describe('ai:models:call', function () { ]) } catch (error: unknown) { const {message} = error as SyntaxError - expect(stripAnsi(message)).to.eq(heredoc` - Invalid JSON. Check the formatting in your --opts value. - Unexpected token i in JSON at position 0 - `.trim()) + expect(stripAnsi(message)).to.contain('Invalid JSON. Check the formatting in your --opts value.') + expect(stripAnsi(message)).to.contain('Unexpected token') } expect(stripAnsi(stderr.output)).to.eq('')