- TestID
- Inputs of the actual function
- Expected output from the test function
- Get the input parameters using the arguments method in js
function first(a, b, c) {
console.log(arguments[0]);
console.log(arguments[1])
console.log(arguments[2])
}
first(1, 2, 3);
//output
//1
//2
//3
Alternatively, we can use parse-function package available at npm for this task.
$ npm i --save parse-function
- Using Parse Function Libray extract the name/ID of the function and the expected output