metadata.js (575B)
1 /** 2 * AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts 3 **/import { assert } from '../util/util.js'; /** Metadata about tests (that can't be derived at runtime). */ 4 5 6 7 8 9 10 11 12 13 14 15 16 17 export function loadMetadataForSuite(suiteDir) { 18 assert(typeof require !== 'undefined', 'loadMetadataForSuite is only implemented on Node'); 19 20 const fs = require('fs'); 21 22 const metadataFile = `${suiteDir}/listing_meta.json`; 23 if (!fs.existsSync(metadataFile)) { 24 return null; 25 } 26 27 const metadata = JSON.parse(fs.readFileSync(metadataFile, 'utf8')); 28 return metadata; 29 }