From 3b965ffeb8d9173d19a83f52b8791f69497e62cb Mon Sep 17 00:00:00 2001 From: chenkai008 Date: Wed, 16 Feb 2022 09:35:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=A7=E8=A1=8C=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chenkai008 --- .../src/main/js/default/test/File.test.js | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/storage/storagefilejstest/src/main/js/default/test/File.test.js b/storage/storagefilejstest/src/main/js/default/test/File.test.js index ed18a62d1..8f5b0b64d 100644 --- a/storage/storagefilejstest/src/main/js/default/test/File.test.js +++ b/storage/storagefilejstest/src/main/js/default/test/File.test.js @@ -2805,27 +2805,25 @@ describe('fileTest', function () { uri: 'internal://cache/File_Copy_005d', success: function () { console.log('File_Copy_005 call mkdir success.'); - done(); + file.copy({ + srcUri: 'internal://cache/File_Copy_005d', + dstUri: 'internal://cache/File_Copy_005d_1', + success: function () { + console.log('File_Copy_005 call copy success.'); + expect(null).assertFail(); + }, + fail: function (data, code) { + console.log('File_Copy_005 , code: ' + code + ', data: ' + data); + expect(code == 300).assertTrue(); + done(); + }, + }); }, fail: function (data, code) { console.error('File_Copy_005 call mkdir fail, code: ' + code + ', data: ' + data); expect(null).assertFail(); }, }); - sleep(2); - file.copy({ - srcUri: 'internal://cache/File_Copy_005d', - dstUri: 'internal://cache/File_Copy_005d_1', - success: function () { - console.log('File_Copy_005 call copy success.'); - expect(null).assertFail(); - }, - fail: function (data, code) { - console.log('File_Copy_005 , code: ' + code + ', data: ' + data); - expect(code == 300).assertTrue(); - done(); - }, - }); }); /** -- GitLab