Skip to content

Commit 8ba09bd

Browse files
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
1 parent bd8c5fc commit 8ba09bd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/runtime/src/webcontainer/terminal-config.spec.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ describe('TerminalConfig', () => {
5656
expect(config.panels[0].id).toBe('foo');
5757
expect(config.panels[0].processOptions).toEqual({
5858
allowRedirects: false,
59-
allowCommands: undefined,
59+
allowCommands: ['ls', 'echo'],
6060
});
6161
expect(config.panels[1].title).toBe('Bar');
6262
expect(config.panels[1].id).toBe('bar');
6363
expect(config.panels[1].processOptions).toEqual({
6464
allowRedirects: false,
65-
allowCommands: undefined,
65+
allowCommands: ['ls', 'echo'],
6666
});
6767
});
6868

@@ -144,13 +144,13 @@ describe('TerminalConfig', () => {
144144
expect(config.panels[0].title).toBe('TERM 1');
145145
expect(config.panels[0].processOptions).toEqual({
146146
allowRedirects: true,
147-
allowCommands: ['echo'],
147+
allowCommands: ['ls', 'echo'],
148148
});
149149

150150
expect(config.panels[1].title).toBe('TERM 2');
151151
expect(config.panels[1].processOptions).toEqual({
152152
allowRedirects: true,
153-
allowCommands: ['echo'],
153+
allowCommands: ['ls', 'echo'],
154154
});
155155

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

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

0 commit comments

Comments
 (0)