File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -169,17 +169,15 @@ describe('Image Upload Functionality', () => {
169169 expect ( paths ) . toEqual ( [ './ConstellationFS Demo · 1.21am · 09-11.jpeg' , '../images/café ñoño (2024).png' ] )
170170 } )
171171
172- test ( 'should auto-detect paths with spaces and special characters' , ( ) => {
173- const input =
174- '/Users/brandonchen/Downloads/ConstellationFS Demo · 1.21am · 09-11.jpeg'
172+ test ( 'should require quotes for paths with spaces to avoid false positives' , ( ) => {
173+ const input = '/Users/brandonchen/Downloads/ConstellationFS Demo · 1.21am · 09-11.jpeg'
175174 const paths = extractImagePaths ( input )
176- expect ( paths ) . toEqual ( [
177- '/Users/brandonchen/Downloads/ConstellationFS Demo · 1.21am · 09-11.jpeg' ,
178- ] )
175+ // Unquoted paths with spaces are not auto-detected to avoid false positives
176+ expect ( paths ) . toEqual ( [ ] )
179177 } )
180178
181- test ( 'should handle standalone paths with spaces as the entire input ' , ( ) => {
182- const input = ' /Users/test/My Documents/screenshot file.png '
179+ test ( 'should detect quoted paths with spaces' , ( ) => {
180+ const input = '" /Users/test/My Documents/screenshot file.png" '
183181 const paths = extractImagePaths ( input )
184182 expect ( paths ) . toEqual ( [ '/Users/test/My Documents/screenshot file.png' ] )
185183 } )
You can’t perform that action at this time.
0 commit comments