Get help with testing, discuss unit testing strategies etc.


Post by zombeerose »

While trying to incorporate the new 'eval' action into my tests, I came across 2 problems:

1) Line 8989 references an undefined "error" variable. It should be replaced with "parsed.error"

2) I am unable to use 'eval' when a method param is an object. Sample syntax:
'someFunction("string",{oName:null})'

Results in this error: "Can't parse arguments: "string",{oName:null}" from an "unexpected token" exception.

Post by nickolay »

1) Fixed, thanks!
2) Its because Eval will use JSON.parse to parse the arguments - need to quote the "oName" to make it valid JSON. This should be mentioned in docs, updating them.

Eval is not quite Run action you were describing, we probably will also have one more action, with object config.

Post Reply