(criteria)
| 136 | } |
| 137 | |
| 138 | function score(criteria) { |
| 139 | const passed = criteria.filter((item) => item.status === 'pass').length; |
| 140 | return { |
| 141 | passed, |
| 142 | total: criteria.length, |
| 143 | label: `${passed}/${criteria.length}`, |
| 144 | }; |
| 145 | } |
| 146 | |
| 147 | function buildTrial(projectRoot, options = {}) { |
| 148 | const root = path.resolve(projectRoot || process.cwd()); |