(filepath, fields)
| 24 | } |
| 25 | |
| 26 | function validate(filepath, fields) { |
| 27 | const report = fs.readFileSync(filepath, 'utf8'); |
| 28 | if (process.report.compact) { |
| 29 | const end = report.indexOf('\n'); |
| 30 | assert.strictEqual(end, report.length - 1); |
| 31 | } |
| 32 | validateContent(JSON.parse(report), fields); |
| 33 | } |
| 34 | |
| 35 | function validateContent(report, fields = []) { |
| 36 | if (typeof report === 'string') { |
no test coverage detected
searching dependent graphs…