From 658c18b27bcdb57d50566d164ce488fed59787b1 Mon Sep 17 00:00:00 2001 From: fengzewu Date: Thu, 18 Aug 2022 11:21:51 +0800 Subject: [PATCH] fix err!=undefine to err!=0 Signed-off-by: fengzewu --- .../imageCreator/src/main/js/test/creator.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/multimedia/image/image_js_standard/imageCreator/src/main/js/test/creator.test.js b/multimedia/image/image_js_standard/imageCreator/src/main/js/test/creator.test.js index 41c03a089..8eee569e8 100644 --- a/multimedia/image/image_js_standard/imageCreator/src/main/js/test/creator.test.js +++ b/multimedia/image/image_js_standard/imageCreator/src/main/js/test/creator.test.js @@ -81,7 +81,7 @@ describe('ImageCreator', function () { return } img.getComponent(JPEG, async (err, component) => { - if (err != undefined) { + if (err != 0) { expect(false).assertTrue(); console.log(`${testNum} getComponent err:` + err); done(); @@ -462,7 +462,7 @@ describe('ImageCreator', function () { return; } img.getComponent(JPEG, (err, component) => { - if (err != undefined) { + if (err != 0) { expect(false).assertTrue(); done(); return; @@ -565,7 +565,7 @@ describe('ImageCreator', function () { var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY); if (creator != undefined) { creator.dequeueImage((err, img) => { - if (err != undefined || img == undefined) { + if (err != 0 || img == undefined) { console.log('Creator_007 dequeueImage error:' + err); expect(false).assertTrue(); done(); @@ -688,7 +688,7 @@ describe('ImageCreator', function () { return; } creator.on('imageRelease', (err) => { - if (err != undefined) { + if (err != 0) { console.info('Creator_008 on release faild' + err); expect(false).assertTrue(); done(); -- GitLab