(id)
| 66 | return ctx.state.getPaths() |
| 67 | }, |
| 68 | async readTestFile(id) { |
| 69 | if (!ctx.state.filesMap.has(id) || !existsSync(id)) { |
| 70 | return null |
| 71 | } |
| 72 | return fs.readFile(id, 'utf-8') |
| 73 | }, |
| 74 | async saveTestFile(id, content) { |
| 75 | if (!ctx.state.filesMap.has(id) || !existsSync(id)) { |
| 76 | throw new Error( |