Skip to content

Commit 8f283a3

Browse files
committed
test: shell test fails because of gh action secrets
1 parent b82d740 commit 8f283a3

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

src/eclipse/shell/shell.spec.ts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,20 @@ describe('Shell', () => {
1616
it('should spawn a new child process', async () => {
1717
await shell.initialize('test', ['arg1', 'arg2'], { env1: 'test' });
1818

19+
const env = {
20+
...process.env,
21+
env1: 'test',
22+
};
23+
24+
//@ts-ignore
25+
delete env.ECLIPSE_API_URL;
26+
//@ts-ignore
27+
delete env.ECLIPSE_CLI_KEY;
28+
1929
expect(spawn).toHaveBeenCalledTimes(1);
2030
expect(spawn).toHaveBeenCalledWith('test', ['arg1', 'arg2'], {
2131
stdio: 'inherit',
22-
env: { ...process.env, env1: 'test' },
32+
env,
2333
});
2434
});
2535
});
@@ -31,10 +41,17 @@ describe('Shell', () => {
3141
env1: 'test',
3242
});
3343

34-
expect(result).toEqual({
44+
const env = {
3545
...process.env,
3646
env1: 'test',
37-
});
47+
};
48+
49+
//@ts-ignore
50+
delete env.ECLIPSE_API_URL;
51+
//@ts-ignore
52+
delete env.ECLIPSE_CLI_KEY;
53+
54+
expect(result).toEqual(env);
3855
});
3956
});
4057
});

0 commit comments

Comments
 (0)