delete function not be need mock

Signed-off-by: sambaby <1337922982@qq.com>
This commit is contained in:
sambaby
2023-09-15 17:39:30 +08:00
parent 2e442ded67
commit 22ca202d3c
@@ -27,6 +27,9 @@ import { getCallbackStatement, getReturnStatement } from './generateCommonUtil';
* @returns
*/
export function generateExportFunction(functionEntity: FunctionEntity, sourceFile: SourceFile, mockApi: string): string {
if (functionEntity.functionName !== 'getContext') {
return '';
}
let functionBody = '';
functionBody = `global.${functionEntity.functionName} = function (...args) {`;
functionBody += `console.warn('The ${functionEntity.functionName} interface in the Previewer is a mocked implementation and may behave differently than on a real device.');\n`;