The id of a fixture symbol, looked up through the API itself.
(name: string)
| 110 | |
| 111 | /** The id of a fixture symbol, looked up through the API itself. */ |
| 112 | async function idOf(name: string): Promise<string> { |
| 113 | const res = await call(`/api/search?q=${encodeURIComponent(name)}`); |
| 114 | const hit = res.body.results.items.find((r: any) => r.name === name); |
| 115 | expect(hit, `no symbol named ${name}`).toBeTruthy(); |
| 116 | return hit.id as string; |
| 117 | } |
| 118 | |
| 119 | function trailsDir(): string { |
| 120 | return path.join(projectRoot, TRAILS_RELATIVE_DIR); |