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 0815d947bdf30b8f4b6857a1f2a6420ab4859038..25189f587f135374e8a4f20943567a4d0b7ae505 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(); } });