Skip to content
Prev Previous commit
Next Next commit
test(terminal): update tests to align with default command behavior
adjust tests to expect ['ls', 'echo'] as default allowCommands when undefined, aligning tests with updated functionality

closes #302
  • Loading branch information
RonithManikonda committed Oct 31, 2024
commit 8ba09bd809f671b8aea70c55585a8803f514100c
10 changes: 5 additions & 5 deletions packages/runtime/src/webcontainer/terminal-config.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ describe('TerminalConfig', () => {
expect(config.panels[0].id).toBe('foo');
expect(config.panels[0].processOptions).toEqual({
allowRedirects: false,
allowCommands: undefined,
allowCommands: ['ls', 'echo'],
});
expect(config.panels[1].title).toBe('Bar');
expect(config.panels[1].id).toBe('bar');
expect(config.panels[1].processOptions).toEqual({
allowRedirects: false,
allowCommands: undefined,
allowCommands: ['ls', 'echo'],
});
});

Expand Down Expand Up @@ -144,13 +144,13 @@ describe('TerminalConfig', () => {
expect(config.panels[0].title).toBe('TERM 1');
expect(config.panels[0].processOptions).toEqual({
allowRedirects: true,
allowCommands: ['echo'],
allowCommands: ['ls', 'echo'],
Comment thread
RonithManikonda marked this conversation as resolved.
Outdated
});

expect(config.panels[1].title).toBe('TERM 2');
expect(config.panels[1].processOptions).toEqual({
allowRedirects: true,
allowCommands: ['echo'],
allowCommands: ['ls', 'echo'],
});

expect(config.panels[2].title).toBe('OUT');
Expand All @@ -171,7 +171,7 @@ describe('TerminalConfig', () => {
expect(config.panels[0].title).toBe('TERM 1');
expect(config.panels[0].processOptions).toEqual({
allowRedirects: false,
allowCommands: ['echo'],
allowCommands: ['ls', 'echo'],
});

expect(config.panels[1].title).toBe('TERM 2');
Expand Down