Add UUID Mock test

Signed-off-by: linhaoran <linhaoran2@huawei.com>
This commit is contained in:
linhaoran
2022-08-17 17:12:41 +08:00
committed by parrotli
parent 4c99e4be7e
commit 00aaabf7ef
@@ -551,7 +551,22 @@ export function mockUtil() {
console.warn("util.promisify interface mocked in the Previewer. How this interface works on the Previewer" +
" may be different from that on a real device.");
return paramMock.paramObjectMock;
},
randomUUID: function (...args) {
console.warn("util.randomUUID interface mocked in the Previewer. How this interface works on the Previewer" +
" may be different from that on a real device.");
return paramMock.paramStringMock;
},
randomBinaryUUID: function (...args) {
console.warn("util.randomBinaryUUID interface mocked in the Previewer. How this interface works on the Previewer" +
" may be different from that on a real device.");
return paramMock.paramArrayMock;
},
parseUUID: function (...args) {
console.warn("util.parseUUID interface mocked in the Previewer. How this interface works on the Previewer" +
" may be different from that on a real device.");
return paramMock.paramArrayMock;
}
};
return utilMock;
}
}