(dir, files)
| 47 | const argv = require('yargs').argv; |
| 48 | |
| 49 | function findTestFiles(dir, files) { |
| 50 | files = files || []; |
| 51 | fs.readdirSync(dir).forEach(file => { |
| 52 | const filePath = path.join(dir, file); |
| 53 | if (!file.endsWith('node_modules') && !file.startsWith('.') && |
| 54 | fs.statSync(filePath).isDirectory() && |
| 55 | !fs.existsSync(path.join(filePath, 'package.json'))) { |
| 56 | files = findTestFiles(filePath, files); |
| 57 | } else if (filePath.endsWith('test.ts')) { |
| 58 | files.push(filePath.replace('src/', './').replace('.ts', '')); |
| 59 | } |
| 60 | }); |
| 61 | return files; |
| 62 | }; |
| 63 | |
| 64 | let files = findTestFiles('./src'); |
| 65 | files = files.map(f => `import '${f}';`); |
no test coverage detected
searching dependent graphs…