()
| 176 | } |
| 177 | |
| 178 | async function main() { |
| 179 | log('Starting npm package integrity tests...'); |
| 180 | log(`Root directory: ${ROOT_DIR}`); |
| 181 | |
| 182 | let allPassed = true; |
| 183 | |
| 184 | for (const packageName of PACKAGES_TO_TEST) { |
| 185 | log(`\n=== Testing ${packageName} ===`); |
| 186 | |
| 187 | const packOk = testPackagePack(packageName); |
| 188 | const browserOk = testBrowserCompatibility(packageName); |
| 189 | const pkgJsonOk = testPackageJson(packageName); |
| 190 | |
| 191 | if (!packOk || !browserOk || !pkgJsonOk) { |
| 192 | allPassed = false; |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | log('\n=== Summary ==='); |
| 197 | if (allPassed) { |
| 198 | log('All package integrity tests passed!'); |
| 199 | process.exit(0); |
| 200 | } else { |
| 201 | error('Some package integrity tests failed!'); |
| 202 | process.exit(1); |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | main().catch(e => { |
| 207 | error(e.message); |
no test coverage detected