From b08e1ed498cb73569c4d75918e2e1daed1644d0c Mon Sep 17 00:00:00 2001 From: raoxian Date: Tue, 14 Jun 2022 15:55:11 +0800 Subject: [PATCH] update fileio testcase Signed-off-by: raoxian --- .../test/module_fileio/members/copyFile.test.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/copyFile.test.js b/storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/copyFile.test.js index 0815d947b..25189f587 100644 --- a/storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/copyFile.test.js +++ b/storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/copyFile.test.js @@ -166,11 +166,15 @@ describe('fileio_copyfile', function () { it('fileio_copy_file_async_003', 0, async function (done) { let fpath = await nextFileName('fileio_copy_file_async_003'); try { - await fileio.copyFile(1, fpath); + fileio + .copyFile(1, fpath) + .then(function (err) { + fileio.unlinkSync(fpath); + done(); + }); } catch (e) { console.log('fileio_copy_file_async_003 has failed for ' + e); - expect(e.message == "Invalid argument").assertTrue(); - done(); + expect(null).assertFail(); } }); -- GitLab