Use var statement to define functions:
````
var getTestName = function(result) {
  ...
};
````