* Separates the list of files to check into groups based on their AMP formats. * @param {Array } filesToCheck * @return {Promise }
(filesToCheck)
| 62 | * @return {Promise<Object>} |
| 63 | */ |
| 64 | async function getFileGroups(filesToCheck) { |
| 65 | logLocalDev(green('Sorting HTML fixtures into format groups...')); |
| 66 | const fileGroups = {AMP4ADS: [], AMP4EMAIL: [], AMP: []}; |
| 67 | await Promise.all( |
| 68 | filesToCheck.map(async (file) => |
| 69 | fileGroups[await getAmpFormat(file)].push(file) |
| 70 | ) |
| 71 | ); |
| 72 | return fileGroups; |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * Checks for the existence of a local wasm / js validator binary and returns |
no test coverage detected