MCPcopy Index your code
hub / github.com/nodejs/node / validate

Function validate

test/common/report.js:26–33  ·  view source on GitHub ↗
(filepath, fields)

Source from the content-addressed store, hash-verified

24}
25
26function 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
35function validateContent(report, fields = []) {
36 if (typeof report === 'string') {

Callers 6

wrapHookFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50

Calls 4

validateContentFunction · 0.85
parseMethod · 0.65
readFileSyncMethod · 0.45
indexOfMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…