@@ -16,17 +16,16 @@ describe("trash", async () => {
1616
1717 beforeAll ( async ( ) => {
1818 await filen . cloud ( ) . emptyTrash ( )
19- root = ( await prepareCloudFs ( [ "file1 .txt" , "file2 .txt" ] ) ) . root
20- await filen . fs ( ) . rm ( { path : root . navigate ( "file1 .txt" ) . toString ( ) , permanent : false } )
21- await filen . fs ( ) . rm ( { path : root . navigate ( "file2 .txt" ) . toString ( ) , permanent : false } )
19+ root = ( await prepareCloudFs ( [ "trashtest_file1 .txt" , "trashtest_file2 .txt" ] ) ) . root
20+ await filen . fs ( ) . rm ( { path : root . navigate ( "trashtest_file1 .txt" ) . toString ( ) , permanent : false } )
21+ await filen . fs ( ) . rm ( { path : root . navigate ( "trashtest_file2 .txt" ) . toString ( ) , permanent : false } )
2222 } )
2323
2424 it ( "should list trash items" , async ( ) => {
25- await waitForAsyncEndpoint ( )
2625 await waitForAsyncEndpoint ( )
2726 const { output } = await runMockApp ( { cmd : "trash list" } )
28- expect ( output ( ) ) . toContain ( "file1 .txt" )
29- expect ( output ( ) ) . toContain ( "file2 .txt" )
27+ expect ( output ( ) ) . toContain ( "trashtest_file1 .txt" )
28+ expect ( output ( ) ) . toContain ( "trashtest_file2 .txt" )
3029 } )
3130
3231 it ( "should delete trash item" , async ( ) => {
@@ -43,7 +42,9 @@ describe("trash", async () => {
4342 it ( "should list empty trash" , async ( ) => {
4443 await waitForAsyncEndpoint ( )
4544 const { output } = await runMockApp ( { cmd : "trash list" } )
46- expect ( output ( ) ) . toContain ( "empty" )
45+ expect ( output ( ) ) . not . toContain ( "trashtest_file1.txt" )
46+ expect ( output ( ) ) . not . toContain ( "trashtest_file2.txt" )
47+ // there might be other test suites running concurrently, so we can't check that it's completely empty
4748 } )
4849
4950} )
0 commit comments