Commit 24bfc280 authored by aniket-engg's avatar aniket-engg Committed by Aniket

error message improvement

parent 64d37b0f
...@@ -167,7 +167,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com ...@@ -167,7 +167,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
let sendParams: Record<string, string> | null = null let sendParams: Record<string, string> | null = null
if (sender) sendParams = { from: sender } if (sender) sendParams = { from: sender }
if(func.inputs && func.inputs.length > 0) if(func.inputs && func.inputs.length > 0)
return resultsCallback(new Error('Method inside a test contract can not have parameters'), { passingNum, failureNum, timePassed }) return resultsCallback(new Error(`Method '${func.name}' can not have parameters inside a test contract`), { passingNum, failureNum, timePassed })
const method = testObject.methods[func.name].apply(testObject.methods[func.name], []) const method = testObject.methods[func.name].apply(testObject.methods[func.name], [])
const startTime = Date.now() const startTime = Date.now()
if (func.constant) { if (func.constant) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment