()
| 59 | } |
| 60 | |
| 61 | export function assertValidationDependenciesInstalled(): void { |
| 62 | const missing: string[] = []; |
| 63 | if (!isPackageInstalled('sharp')) missing.push('sharp'); |
| 64 | if (!isPackageInstalled('playwright')) missing.push('playwright'); |
| 65 | |
| 66 | if (missing.length === 0) { |
| 67 | return; |
| 68 | } |
| 69 | |
| 70 | throw new Error(formatValidationDependencyHelp(missing)); |
| 71 | } |
| 72 | |
| 73 | export function ensurePackageInstalled(packageName: string, packageNameInRegistry?: string) { |
| 74 | const pkgName = packageNameInRegistry || packageName; |
no test coverage detected