feat: add persistent desktop assistant workspace
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent
698a15ad14
commit
6ef1795b81
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import {
|
||||
createAnthropicApiBaseUrl,
|
||||
createAnthropicMessagesUrl
|
||||
} from './anthropic-endpoint'
|
||||
|
||||
describe('Anthropic endpoint normalization', () => {
|
||||
it.each([
|
||||
['https://model.example', 'https://model.example/v1'],
|
||||
['https://model.example/', 'https://model.example/v1'],
|
||||
['https://model.example/v1', 'https://model.example/v1'],
|
||||
['https://model.example/proxy/', 'https://model.example/proxy/v1']
|
||||
])('normalizes %s to an API root', (input, expected) => {
|
||||
expect(createAnthropicApiBaseUrl(input)).toBe(expected)
|
||||
})
|
||||
|
||||
it('creates the messages endpoint without duplicating v1', () => {
|
||||
expect(
|
||||
createAnthropicMessagesUrl('https://model.example/v1').toString()
|
||||
).toBe('https://model.example/v1/messages')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user