Skip to content

Commit ef7517c

Browse files
data-douserCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nathan Randall <70299490+data-douser@users.noreply.github.com>
1 parent 7f7356c commit ef7517c

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

client/src/lib/integration-test-runner.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,10 @@ export class IntegrationTestRunner {
11431143

11441144
if (!fs.existsSync(promptTestsDir)) {
11451145
this.logger.log("No prompt integration tests directory found", "INFO");
1146-
return true;
1146+
return {
1147+
executed: 0,
1148+
passed: true
1149+
};
11471150
}
11481151

11491152
// Get list of available prompts from the server

server/test/src/prompts/workflow-prompts.test.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,11 +1788,18 @@ describe('Workflow Prompts', () => {
17881788
});
17891789

17901790
it('should allow absolute paths outside the workspace root', async () => {
1791-
const result = await resolvePromptFilePath('/tmp/external-db', testDir);
1792-
expect(result.blocked).toBeUndefined();
1793-
expect(result.resolvedPath).toBe('/tmp/external-db');
1794-
// The file likely does not exist, so a warning is expected.
1795-
expect(result.warning).toContain('does not exist');
1791+
const externalWorkspace = createTestTempDir('resolvePromptFilePath-external-workspace');
1792+
const externalPath = join(externalWorkspace, 'external-db');
1793+
1794+
try {
1795+
const result = await resolvePromptFilePath(externalPath, testDir);
1796+
expect(result.blocked).toBeUndefined();
1797+
expect(result.resolvedPath).toBe(externalPath);
1798+
// The file does not exist, so a warning is expected.
1799+
expect(result.warning).toContain('does not exist');
1800+
} finally {
1801+
cleanupTestTempDir(externalWorkspace);
1802+
}
17961803
});
17971804

17981805
it('should not flag filenames containing consecutive dots as traversal', async () => {

0 commit comments

Comments
 (0)