@@ -169,24 +169,6 @@ describe('archiveWorkspaceFileItemsOperation', () => {
169169 input : { workspaceId : 'ws-1' , fileIds, acceptVfsPath } ,
170170 } )
171171
172- it ( 'archives the file each path names, once even when its id is also listed' , async ( ) => {
173- await deleteByReference ( [ 'files/Docs/a.csv' , 'file-a' , 'file-b' ] )
174- expect ( mockArchive ) . toHaveBeenCalledWith (
175- expect . objectContaining ( { fileIds : [ 'file-a' , 'file-b' ] } )
176- )
177- } )
178-
179- it ( 'archives nothing when one path names no live file, and says which' , async ( ) => {
180- await expect ( deleteByReference ( [ 'files/Docs/a.csv' , 'files/Docs/gone.csv' ] ) ) . rejects . toThrow (
181- 'No live file at "files/Docs/gone.csv"'
182- )
183- await expect ( deleteByReference ( [ 'files/Docs/a.csv,files/Docs/b.csv' ] ) ) . rejects . toThrow (
184- 'pass each path as its own entry'
185- )
186- expect ( mockAssertItems ) . not . toHaveBeenCalled ( )
187- expect ( mockArchive ) . not . toHaveBeenCalled ( )
188- } )
189-
190172 it ( 'looks up no path for a caller it refuses' , async ( ) => {
191173 mockResolvePermission . mockImplementation ( async ( ) => {
192174 events . push ( 'authorize' )
@@ -198,14 +180,6 @@ describe('archiveWorkspaceFileItemsOperation', () => {
198180 expect ( events ) . toEqual ( [ 'resolve' , 'authorize' ] )
199181 } )
200182
201- it ( 'leaves a path an unknown id for a caller that did not opt in' , async ( ) => {
202- await deleteByReference ( [ 'files/Docs/a.csv' ] , false )
203- expect ( mockResolveReference ) . not . toHaveBeenCalled ( )
204- expect ( mockAssertItems ) . toHaveBeenCalledWith (
205- expect . objectContaining ( { fileIds : [ 'files/Docs/a.csv' ] } )
206- )
207- } )
208-
209183 it ( 'refuses more paths than one request resolves before looking any up' , async ( ) => {
210184 await expect (
211185 deleteByReference ( Array . from ( { length : 101 } , ( _ , index ) => `files/f-${ index } .csv` ) )
0 commit comments