From 856025bcec432a2fd061994ffff97c2f632b465a Mon Sep 17 00:00:00 2001 From: xdmal <1114560882@qq.com> Date: Tue, 28 Dec 2021 22:28:46 +0800 Subject: [PATCH] Signed-off-by: xdmal <1114560882@qq.com> On branch master Your branch is up to date with 'origin/master'. --- .../util_lib_standard/src/main/js/test/util.test.js | 5 +++-- .../util_lib_standard/src/main/js/test/util.test.js.bak | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/compileruntime/util_lib_standard/src/main/js/test/util.test.js b/compileruntime/util_lib_standard/src/main/js/test/util.test.js index b46e407cf..087aefb4c 100644 --- a/compileruntime/util_lib_standard/src/main/js/test/util.test.js +++ b/compileruntime/util_lib_standard/src/main/js/test/util.test.js @@ -6264,7 +6264,7 @@ describe('TypesTest', function() { it('testIsPromise004', 0, function() { var proc = new util.Types(); var err = Error(33); - var result = proc.isPromise(Promise.reject(err )); + var result = proc.isPromise(Promise.reject(err)); expect(result).assertEqual(true); }) @@ -6276,7 +6276,8 @@ describe('TypesTest', function() { */ it('testIsPromise005', 0, function() { var proc = new util.Types(); - var result = proc.isPromise(Promise.reject(23)); + var err = Error(23); + var result = proc.isPromise(Promise.reject(err)); expect(result).assertEqual(true); }) diff --git a/compileruntime/util_lib_standard/src/main/js/test/util.test.js.bak b/compileruntime/util_lib_standard/src/main/js/test/util.test.js.bak index fabbba333..b46e407cf 100644 --- a/compileruntime/util_lib_standard/src/main/js/test/util.test.js.bak +++ b/compileruntime/util_lib_standard/src/main/js/test/util.test.js.bak @@ -373,11 +373,11 @@ describe('TextEncoderTest', function () { async function promiseFn() { var err = Error('value'); return Promise.reject(err); - expect(err.message).strictEqual('value'); + } var cb = util.callbackWrapper(promiseFn); cb((err, ret) => { - expect(err).strictEqual('value'); + expect(err.message).strictEqual('value'); expect(ret).strictEqual(undefined); }) }) @@ -6263,7 +6263,8 @@ describe('TypesTest', function() { */ it('testIsPromise004', 0, function() { var proc = new util.Types(); - var result = proc.isPromise(Promise.reject(33)); + var err = Error(33); + var result = proc.isPromise(Promise.reject(err )); expect(result).assertEqual(true); }) -- GitLab