We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9764a93 commit 5a76df8Copy full SHA for 5a76df8
extensions/ql-vscode/src/mocks/request-handlers.ts
@@ -39,8 +39,17 @@ async function readRequestFiles(scenarioDirPath: string): Promise<GitHubApiReque
39
40
const requests: GitHubApiRequest[] = [];
41
for (const file of orderedFiles) {
42
+ if (!file.endsWith('.json')) {
43
+ continue;
44
+ }
45
+
46
const filePath = path.join(scenarioDirPath, file);
47
const request: GitHubApiRequest = await fs.readJson(filePath, { encoding: 'utf8' });
48
49
+ if (typeof request.response.body === 'string' && request.response.body.startsWith('file:')) {
50
+ request.response.body = await fs.readFile(path.join(scenarioDirPath, request.response.body.substring(5)));
51
52
53
requests.push(request);
54
}
55
0 commit comments