mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
fix(rest) moveFiles: could not rename (#150)
This commit is contained in:
parent
1665b607cf
commit
016b92381c
3 changed files with 36 additions and 33 deletions
|
|
@ -1 +1 @@
|
|||
undefined
|
||||
hello
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ test('cloudcmd: rest: mv', (t) => {
|
|||
|
||||
fs.mkdirSync(tmp);
|
||||
|
||||
const rmTmp = () => rimraf.sync(tmp);
|
||||
|
||||
put(`http://localhost:${port}/api/v1/mv`, files)
|
||||
.then(warp(_pullout, 'string'))
|
||||
.then((body) => {
|
||||
|
|
@ -44,11 +46,10 @@ test('cloudcmd: rest: mv', (t) => {
|
|||
const file = fs.readFileSync(`${tmp}/mv.txt`);
|
||||
fs.writeFileSync(`${fixtureDir}/mv.txt`, file);
|
||||
|
||||
rimraf.sync(tmp);
|
||||
|
||||
after();
|
||||
})
|
||||
.catch(console.error);
|
||||
.catch(console.error)
|
||||
.then(rmTmp);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue