We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee7b5e7 commit b2e75eaCopy full SHA for b2e75ea
apps/sandbox-container/server/utils.spec.ts
@@ -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
12
+ })
13
+})
0 commit comments