(
promise: Promise<unknown>,
code: string
)
| 89 | } |
| 90 | |
| 91 | async function expectRootSelectionError( |
| 92 | promise: Promise<unknown>, |
| 93 | code: string |
| 94 | ): Promise<RootSelectionError> { |
| 95 | let caught: unknown; |
| 96 | try { |
| 97 | await promise; |
| 98 | } catch (error) { |
| 99 | caught = error; |
| 100 | } |
| 101 | expect(caught).toBeInstanceOf(RootSelectionError); |
| 102 | const error = caught as RootSelectionError; |
| 103 | expect(error.diagnostic.code).toBe(code); |
| 104 | return error; |
| 105 | } |
| 106 | |
| 107 | it('resolves a selected store to its healthy OpenSpec root', async () => { |
| 108 | const storeRoot = await registerStore('team-context'); |
no outgoing calls
no test coverage detected