fix(gateway): bound git scenario preview fan-out
This commit is contained in:
1 parent
d44a3eb4af
commit
67e8ee50a7
2 files changed
+17
-1
No files matched your search
@@ -15,4 +15,14 @@ describe('scenarioCatalog git ref support', () => {
|
||||
const sorted = [...ids].sort((a, b) => a - b);
|
||||
expect(ids).toEqual(sorted);
|
||||
});
|
||||
|
||||
it('rejects without crashing when git cannot be spawned', async () => {
|
||||
const originalPath = process.env.PATH;
|
||||
process.env.PATH = '/nonexistent';
|
||||
try {
|
||||
await expect(resolveGitCommitSha('HEAD')).rejects.toThrow('git ref not found.');
|
||||
} finally {
|
||||
process.env.PATH = originalPath;
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user