Skip to content

Commit f113026

Browse files
committed
update tests
1 parent 782fd6f commit f113026

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/test/features/terminal/shellStartupSetupHandlers.unit.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ suite('Shell Startup Setup Handlers', () => {
133133
assert.strictEqual(exec.calledWith('python-envs.viewLogs'), true);
134134
});
135135

136-
test('handleSettingUpShellProfile: when user declines, does not run setup', async () => {
136+
test('handleSettingUpShellProfile: when user declines, does not run setup and switches to command', async () => {
137137
sinon.stub(windowApis, 'showInformationMessage').resolves(undefined);
138+
const setAuto = sinon.stub(terminalUtils, 'setAutoActivationType').resolves();
138139

139140
const p1 = new TestStartupProvider('bash', 'bash');
140141
const p2 = new TestStartupProvider('zsh', 'zsh');
@@ -143,6 +144,8 @@ suite('Shell Startup Setup Handlers', () => {
143144

144145
assert.strictEqual(p1.setupCalls, 0);
145146
assert.strictEqual(p2.setupCalls, 0);
147+
// When user declines, it switches to command activation
148+
assert.strictEqual(setAuto.calledWith(terminalUtils.ACT_TYPE_COMMAND), true);
146149
});
147150

148151
test('cleanupStartupScripts: always calls teardown on all providers', async () => {

0 commit comments

Comments
 (0)