(network: string)
| 72 | }; |
| 73 | |
| 74 | export const assertReplicaIsHealthy = async (network: string): Promise<void> => { |
| 75 | const ping: { replica_health_status?: string } = JSON.parse( |
| 76 | await execAsync(`dfx ping '${network}'`), |
| 77 | ); |
| 78 | |
| 79 | if (ping.replica_health_status?.toLowerCase() !== 'healthy') { |
| 80 | throw new Error('The replica is not healthy.'); |
| 81 | } |
| 82 | }; |
| 83 | |
| 84 | export const commandExists = (command: string): boolean => { |
| 85 | try { |
no test coverage detected