From 722657f0f2e21af43979d358f0f4daa21103648a Mon Sep 17 00:00:00 2001 From: lixingyang Date: Mon, 25 Jul 2022 20:21:58 +0800 Subject: [PATCH] Corrected the mock problem of the worker module of the language compilation subsystem Signed-off-by: lixingyang https://gitee.com/openharmony/third_party_jsframework/issues/I5ITQQ --- .../extend/systemplugin/napi/ohos_worker.js | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/runtime/main/extend/systemplugin/napi/ohos_worker.js b/runtime/main/extend/systemplugin/napi/ohos_worker.js index 4958d5fd..f4a06d4e 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_worker.js +++ b/runtime/main/extend/systemplugin/napi/ohos_worker.js @@ -102,56 +102,56 @@ export function mockWorker() { this.postMessage = function (...args) { console.warn("Worker.postMessage interface mocked in the Previewer. How this interface works on the Previewer" + " may be different from that on a real device."); - }, + }; this.terminate = function (...args) { console.warn("Worker.terminate interface mocked in the Previewer. How this interface works on the Previewer" + " may be different from that on a real device."); - }, + }; this.on = function (...args) { console.warn("Worker.on interface mocked in the Previewer. How this interface works on the Previewer" + " may be different from that on a real device."); - }, + }; this.once = function (...args) { console.warn("Worker.once interface mocked in the Previewer. How this interface works on the Previewer" + " may be different from that on a real device."); - }, + }; this.off = function (...args) { console.warn("Worker.off interface mocked in the Previewer. How this interface works on the Previewer" + " may be different from that on a real device."); - }, + }; this.addEventListener = function (...args) { console.warn("Worker.addEventListener interface mocked in the Previewer. How this interface works on the" + " Previewer may be different from that on a real device."); - }, + }; this.dispatchEvent = function (...args) { console.warn("Worker.dispatchEvent interface mocked in the Previewer. How this interface works on the" + " Previewer may be different from that on a real device."); return paramMock.paramBooleanMock; - }, + }; this.removeEventListener = function (...args) { console.warn("Worker.removeEventListener interface mocked in the Previewer. How this interface works on the" + " Previewer may be different from that on a real device."); - }, + }; this.removeAllListener = function (...args) { console.warn("Worker.removeAllListener interface mocked in the Previewer. How this interface works on the" + " Previewer may be different from that on a real device."); - }, + }; this.onmessage = function (...args) { console.warn("Worker.onmessage interface mocked in the Previewer. How this interface works on the Previewer" + " may be different from that on a real device."); - }, + }; this.onmessageerror = function (...agrs) { console.warn("Worker.onmessageerror interface mocked in the Previewer. How this interface works on the" + " Previewer may be different from that on a real device."); - }, + }; this.onerror = function (...args) { console.warn("Worker.onerror interface mocked in the Previewer. How this interface works on the Previewer" + " may be different from that on a real device."); - }, + }; this.onclose = function (...args) { console.warn("Worker.onclose interface mocked in the Previewer. How this interface works on the Previewer" + " may be different from that on a real device."); - }, + }; this.onexit = function (...args) { console.warn("Worker.onexit interface mocked in the Previewer. How this interface works on the Previewer" + " may be different from that on a real device.");