Skip to content

Commit

Permalink
Fixing failing tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sbosio committed Sep 27, 2024
1 parent 2df6d15 commit 7715ffc
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions test/commands/ai/models/call.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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('')
Expand Down

0 comments on commit 7715ffc

Please sign in to comment.