rename status from nonEmptyCb to nonEmptyCallback

This commit is contained in:
Dave 2021-06-12 08:23:55 +01:00
parent 3eb6f40c3a
commit 32e129b630
3 changed files with 4 additions and 4 deletions

View File

@ -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,
});

View File

@ -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

View File

@ -128,7 +128,7 @@ const runScript = async (
success: false,
message: err.message,
errors: err.errors,
status: 'nonEmptyCb',
status: 'nonEmptyCallback',
executionTime: performance.now() - start,
consoleLogs,
});