未验证 提交 7e4fc7fb 编写于 作者: O openharmony_ci 提交者: Gitee

!8086 modified the error in the test cases of callbackWrapper

Merge pull request !8086 from jwx1068251/master
...@@ -450,15 +450,13 @@ describe('TextEncoderTest', function () { ...@@ -450,15 +450,13 @@ describe('TextEncoderTest', function () {
returns a function following the error-first callback style. returns a function following the error-first callback style.
*/ */
it('testUtilCallbackWrapper006', 0, async function () { it('testUtilCallbackWrapper006', 0, async function () {
async function promiseFn(){ async function promiseFn() {
return null; return null;
} }
var cb = util.callbackWrapper(promiseFn); var cb = util.callbackWrapper(promiseFn);
try { try {
(async () => { cb([1, 2]);
cb([1, 2]) } catch (err) {
})();
} catch(err) {
expect(err.message).assertEqual('maybe is not function'); expect(err.message).assertEqual('maybe is not function');
} }
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册