The new interface decodeWithStream is added to textdecode in util

Signed-off-by: bi-hu <bihu@huawei.com>
https://gitee.com/openharmony/third_party_jsframework/issues/I5OVUG
This commit is contained in:
bi-hu
2022-08-30 19:37:44 +08:00
parent 96b6ae3dea
commit 7e4428fdce
@@ -25,6 +25,11 @@ export function mockUtil() {
" may be different from that on a real device.");
return paramMock.paramStringMock;
};
this.decodeWithStream = function (...args) {
console.warn("TextDecoder.decodeWithStream interface mocked in the Previewer. How this interface works on the Previewer" +
" may be different from that on a real device.");
return paramMock.paramStringMock;
};
this.encoding = "[PC preview] unknow encoding";
this.fatal = "[PC preview] unknow fatal";
this.ignoreBOM = "[PC preview] unknow ignoreBOM"