提交 b08e1ed4 编写于 作者: R raoxian

update fileio testcase

Signed-off-by: Nraoxian <raoxian@huawei.com>
上级 6911cd26
...@@ -166,11 +166,15 @@ describe('fileio_copyfile', function () { ...@@ -166,11 +166,15 @@ describe('fileio_copyfile', function () {
it('fileio_copy_file_async_003', 0, async function (done) { it('fileio_copy_file_async_003', 0, async function (done) {
let fpath = await nextFileName('fileio_copy_file_async_003'); let fpath = await nextFileName('fileio_copy_file_async_003');
try { try {
await fileio.copyFile(1, fpath); fileio
.copyFile(1, fpath)
.then(function (err) {
fileio.unlinkSync(fpath);
done();
});
} catch (e) { } catch (e) {
console.log('fileio_copy_file_async_003 has failed for ' + e); console.log('fileio_copy_file_async_003 has failed for ' + e);
expect(e.message == "Invalid argument").assertTrue(); expect(null).assertFail();
done();
} }
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册