(p: { input?: [RegExp, unknown][]; password?: [RegExp, unknown][]; select?: [RegExp, unknown][]; checkbox?: [RegExp, unknown][]; confirm?: [RegExp, unknown][] })
| 46 | hasProviderModel: p.hasProviderModel ?? false, |
| 47 | catalogProviders: p.catalogProviders ?? [], |
| 48 | unresolvedCatalogModels: p.unresolvedCatalogModels ?? [], |
| 49 | hasWebSearch: p.hasWebSearch ?? false, |
| 50 | }; |
| 51 | } |
| 52 | const hwGpio = (id: string) => ({ id, label: id, family: "gpio" as const }); |
| 53 | const hwSerial = (id: string) => ({ id, label: id, family: "serial" as const }); |
| 54 | |
| 55 | // Answer a prompt by matching its message against [regex, value] pairs; an |
| 56 | // unmatched prompt throws, so a test never silently drives the wrong path. |
| 57 | type Responder = (o: { message: string }) => Promise<unknown>; |
| 58 | const respond = |
| 59 | (map: [RegExp, unknown][]): Responder => |
no test coverage detected