未验证 提交 632d75b8 编写于 作者: O openharmony_ci 提交者: Gitee

!8097 modified the error in the test cases of callbackWrapper

Merge pull request !8097 from dwx1032708/cherry-pick-1679302606
......@@ -456,15 +456,13 @@ describe('TextEncoderTest', function () {
returns a function following the error-first callback style.
*/
it('testUtilCallbackWrapper006', 0, async function () {
async function promiseFn(){
async function promiseFn() {
return null;
}
var cb = util.callbackWrapper(promiseFn);
try {
(async () => {
cb([1, 2])
})();
} catch(err) {
cb([1, 2]);
} catch (err) {
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.
先完成此消息的编辑!
想要评论请 注册