wip: safe mode updates (#2874)

* wip: safe mode updates

* wip: safe mode updates
This commit is contained in:
lohit
2024-08-21 10:44:50 +05:30
committed by GitHub
parent 64cb45c09a
commit 7b3a5486db
5 changed files with 84 additions and 7 deletions

View File

@@ -142,10 +142,15 @@ const cleanJson = (data) => {
}
};
const appendAwaitToTestFunc = (str) => {
return str.replace(/(?<!\.\s*)(?<!await\s)(test\()/g, 'await $1');
};
module.exports = {
evaluateJsExpression,
evaluateJsTemplateLiteral,
createResponseParser,
internalExpressionCache,
cleanJson
cleanJson,
appendAwaitToTestFunc
};