Fix test
This commit is contained in:
parent
c21aa25fcf
commit
73c977d6fb
|
@ -56,7 +56,7 @@ module.exports.processJS = (handlebars, context) => {
|
||||||
const res = { data: runJS(js, sandboxContext) }
|
const res = { data: runJS(js, sandboxContext) }
|
||||||
return `{{${LITERAL_MARKER} js_result-${JSON.stringify(res)}}}`
|
return `{{${LITERAL_MARKER} js_result-${JSON.stringify(res)}}}`
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.message === "Script execution timed out.") {
|
if (error.code === "ERR_SCRIPT_EXECUTION_TIMEOUT") {
|
||||||
return "Timed out while executing JS"
|
return "Timed out while executing JS"
|
||||||
}
|
}
|
||||||
if (error.name === "ExecutionTimeoutError") {
|
if (error.name === "ExecutionTimeoutError") {
|
||||||
|
|
Loading…
Reference in New Issue