diff --git a/commonlibrary/ets_utils/util_lib_standard/src/main/js/test/util.test.js b/commonlibrary/ets_utils/util_lib_standard/src/main/js/test/util.test.js index 9fc26a0947e3b6e261e51e3d3a8091f72f7cec68..26c3ef6b55d509a03c3da867d968f65e5613c3e9 100644 --- a/commonlibrary/ets_utils/util_lib_standard/src/main/js/test/util.test.js +++ b/commonlibrary/ets_utils/util_lib_standard/src/main/js/test/util.test.js @@ -450,15 +450,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'); } })