Skip to content

Commit b2e75ea

Browse files
committed
forgot a test
1 parent ee7b5e7 commit b2e75ea

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { describe, expect, it } from 'vitest'
2+
import { stripProtocolFromFilePath } from './utils'
3+
4+
describe('get_file_name_from_path', () => {
5+
it('strips file:// protocol from path', async () => {
6+
const path = await stripProtocolFromFilePath('file:///files/contents/cats')
7+
expect(path).toBe('/files/contents/cats')
8+
}),
9+
it('leaves protocol-less paths untouched', async () => {
10+
const path = await stripProtocolFromFilePath('/files/contents/cats')
11+
expect(path).toBe('/files/contents/cats')
12+
})
13+
})

0 commit comments

Comments
 (0)