(filePath: string, abortSignal?: AbortSignal)
| 252 | } |
| 253 | |
| 254 | override readFile(filePath: string, abortSignal?: AbortSignal): ReadableStream<Uint8Array> { |
| 255 | const root = path.resolve(this.readableRoot); |
| 256 | const target = path.resolve(filePath); |
| 257 | if (target !== root && !target.startsWith(`${root}${path.sep}`)) { |
| 258 | throw new Error(`RestrictedTestRuntime cannot read outside ${root}: ${target}`); |
| 259 | } |
| 260 | return super.readFile(filePath, abortSignal); |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | describe("buildStreamSystemContext", () => { |