(testFile)
| 38 | } |
| 39 | |
| 40 | function registerTestInManifest(testFile) { |
| 41 | try { |
| 42 | if (process.env.API_MODE !== 'record') return; |
| 43 | let list = []; |
| 44 | try { |
| 45 | list = JSON.parse(fs.readFileSync(MANIFEST_PATH, 'utf8')); |
| 46 | if (!Array.isArray(list)) list = []; |
| 47 | } catch {} |
| 48 | if (!list.includes(testFile)) { |
| 49 | list.push(testFile); |
| 50 | fs.writeFileSync(MANIFEST_PATH, JSON.stringify(list, null, 2)); |
| 51 | } |
| 52 | } catch {} |
| 53 | } |
| 54 | |
| 55 | function isInManifest(id) { |
| 56 | try { |
no outgoing calls
no test coverage detected