function globPatterns(patterns) {
  // This require will cause a compile error if at module scope.
  // TOOD async load the class.
  let glob = require('glob');
  return Promise.all(
    patterns.map((pattern) => {
      return new Promise((resolve, reject) => {
        glob(pattern, {}, (err, files) => {
          if (err) {
            reject(err);
          } else {
            resolve(files);
          }
        });
      });
    })).then((arrayOfFiles) => {
      let allFiles = [];
      arrayOfFiles.forEach((files) => {
        allFiles.push(...files);
      });
      return allFiles.map((file) => file.replace(/\\/g, '/'));
    });
}
@fileoverview Configure mocha for Traceur testing on node.