Skip to content

Commit

Permalink
test(terminal): update tests to align with default command behavior
Browse files Browse the repository at this point in the history
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
1 parent bd8c5fc commit 8ba09bd
Showing 1 changed file with 5 additions and 5 deletions.
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'],
});

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

0 comments on commit 8ba09bd

Please sign in to comment.