Explorar el Código

[misc] fix unit tests following the merge of atomic writes

Jakob Ackermann hace 5 años
padre
commit
567d02881d
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7 1
      services/clsi/test/unit/js/ContentCacheManagerTests.js

+ 7 - 1
services/clsi/test/unit/js/ContentCacheManagerTests.js

@@ -79,7 +79,13 @@ describe('ContentCacheManager', function () {
             throw new Error()
             throw new Error()
           }
           }
         },
         },
-        rename: sinon.stub().resolves(),
+        async rename(oldName, newName) {
+          if (!files[oldName]) {
+            throw new Error()
+          }
+          files[newName] = files[oldName]
+          delete files[oldName]
+        },
         unlink: sinon.stub().resolves()
         unlink: sinon.stub().resolves()
       }
       }
     }
     }