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 580420fc2aa31a04d8897af9793b21021176bf2e..40505f4e629161af90ed4f26887ea66bcf73f057 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 != 0) { + if (err != undefined) { 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 != 0) { + if (err != undefined) { 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 != 0 || img == undefined) { + if (err != undefined || img == undefined) { console.log('Creator_007 dequeueImage error:' + err); expect(false).assertTrue(); done(); @@ -683,7 +683,7 @@ describe('ImageCreator', function () { return; } creator.on('imageRelease', (err) => { - if (err != 0) { + if (err != undefined) { console.info('Creator_008 on release faild' + err); expect(false).assertTrue(); done();