test(mv) promises

This commit is contained in:
coderaiser 2019-10-09 17:03:46 +03:00
parent d062b8c32f
commit b72df1d64c

View file

@ -14,6 +14,8 @@ const cloudcmdPath = '../../';
const dir = cloudcmdPath + 'server/';
const restPath = dir + 'rest';
const {assign} = Object;
test('cloudcmd: rest: mv', async (t) => {
const volume = {
'/fixture/mv.txt': 'hello',
@ -26,6 +28,9 @@ test('cloudcmd: rest: mv', async (t) => {
.use(vol)
.use(fs);
assign(unionFS, {
promises: fs.promises,
});
mockRequire('fs', unionFS);
reRequire('@cloudcmd/rename-files');