Skip to content

Commit f1b4a09

Browse files
committed
Add getResolvedCodeQLDir() caching test assertion
1 parent 77c1ba7 commit f1b4a09

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/test/src/lib/cli-executor.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,12 +676,15 @@ describe('CODEQL_PATH - PATH prepend integration', () => {
676676
it('should cache resolved value and ignore subsequent env changes', () => {
677677
delete process.env.CODEQL_PATH;
678678
const first = resolveCodeQLBinary();
679+
const firstDir = getResolvedCodeQLDir();
679680
expect(first).toBe('codeql');
680681

681682
// Change the env after resolution — should still return cached value
682683
process.env.CODEQL_PATH = '/some/changed/path/codeql';
683684
const second = resolveCodeQLBinary();
685+
const secondDir = getResolvedCodeQLDir();
684686
expect(second).toBe('codeql');
687+
expect(secondDir).toBe(firstDir);
685688
});
686689

687690
it.skipIf(process.platform === 'win32')('should prepend CODEQL_PATH directory to child process PATH', async () => {

0 commit comments

Comments
 (0)