(r: RunningServer)
| 104 | } |
| 105 | |
| 106 | async function createSession(r: RunningServer): Promise<string> { |
| 107 | const res = await appOf(r).inject({ |
| 108 | method: 'POST', |
| 109 | url: '/api/v1/sessions', |
| 110 | payload: { metadata: { cwd: workspace } }, |
| 111 | }); |
| 112 | const env = envelopeOf<{ id: string }>(res.json()); |
| 113 | if (env.code !== 0 || env.data === null) { |
| 114 | throw new Error(`create session failed: ${JSON.stringify(env)}`); |
| 115 | } |
| 116 | return env.data.id; |
| 117 | } |
| 118 | |
| 119 | describe('POST /api/v1/sessions/{sid}/fs:mkdir', () => { |
| 120 | it('creates a single directory under cwd', async () => { |
no test coverage detected