From 32e129b630b67011a18afe3222110ed5dc847aec Mon Sep 17 00:00:00 2001 From: Dave Date: Sat, 12 Jun 2021 08:23:55 +0100 Subject: [PATCH] rename status from nonEmptyCb to nonEmptyCallback --- _test/script-monitor/scriptSandbox.js | 2 +- backend/backend/services/probeService.js | 4 ++-- probe/utils/scriptSandbox.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_test/script-monitor/scriptSandbox.js b/_test/script-monitor/scriptSandbox.js index 93b5550c28..a91d2f194b 100644 --- a/_test/script-monitor/scriptSandbox.js +++ b/_test/script-monitor/scriptSandbox.js @@ -123,7 +123,7 @@ const runScript = async (functionCode, isCalled, options = { maxScriptRunTime, m success: false, message: err.message, errors: err.errors, - status: 'nonEmptyCb', + status: 'nonEmptyCallback', executionTime: performance.now() - start, consoleLogs, }); diff --git a/backend/backend/services/probeService.js b/backend/backend/services/probeService.js index c74d64ac67..02bb342792 100755 --- a/backend/backend/services/probeService.js +++ b/backend/backend/services/probeService.js @@ -6381,7 +6381,7 @@ const checkScriptCondition = (condition, body) => { validity.reason = `Script did not throw error`; } } else if (condition.filter === 'emptyCallback') { - if (body.statusText === 'nonEmptyCb' && body.error) { + if (body.statusText === 'nonEmptyCallback' && body.error) { validity.valid = false; validity.reason = `Script callback invoked with arguments ${JSON.stringify( body.error @@ -6391,7 +6391,7 @@ const checkScriptCondition = (condition, body) => { validity.reason = `Script callback has no arguments`; } } else if (condition.filter === 'nonEmptyCallback') { - if (body.statusText === 'nonEmptyCb' && body.error) { + if (body.statusText === 'nonEmptyCallback' && body.error) { validity.valid = true; validity.reason = `Script callback invoked with arguments ${JSON.stringify( body.error diff --git a/probe/utils/scriptSandbox.js b/probe/utils/scriptSandbox.js index 4252bbf691..0fc8d7c289 100644 --- a/probe/utils/scriptSandbox.js +++ b/probe/utils/scriptSandbox.js @@ -128,7 +128,7 @@ const runScript = async ( success: false, message: err.message, errors: err.errors, - status: 'nonEmptyCb', + status: 'nonEmptyCallback', executionTime: performance.now() - start, consoleLogs, });