Bug 963009 - [Gaia][Build] Test coverage

line 32~38 can be replaced by
```js
        if (typeof validation_function !== 'function' ||
          validation_function(file))
          results.push(file);
        }
```