Files
Courtney SimsandGitHub f8d9ba2fdf Update container read tool call (#54)
* Update read tool call

* forgot a test

* prettier
2025-04-21 09:31:50 -05:00

15 lines
510 B
TypeScript

import { describe, expect, it } from 'vitest'
import { stripProtocolFromFilePath } from './utils'
describe('get_file_name_from_path', () => {
it('strips file:// protocol from path', async () => {
const path = await stripProtocolFromFilePath('file:///files/contents/cats')
expect(path).toBe('/files/contents/cats')
}),
it('leaves protocol-less paths untouched', async () => {
const path = await stripProtocolFromFilePath('/files/contents/cats')
expect(path).toBe('/files/contents/cats')
})
})