|
3 | 3 | * Licensed under the MIT License. See License.txt in the project root for license information. |
4 | 4 | *--------------------------------------------------------------------------------------------*/ |
5 | 5 |
|
6 | | -import { window, Pseudoterminal, EventEmitter, TerminalDimensions, workspace, ConfigurationTarget, Disposable, UIKind, env, EnvironmentVariableMutatorType, EnvironmentVariableMutator, extensions, ExtensionContext } from 'vscode'; |
| 6 | +import { window, Pseudoterminal, EventEmitter, TerminalDimensions, workspace, ConfigurationTarget, Disposable, UIKind, env, EnvironmentVariableMutatorType, EnvironmentVariableMutator, extensions, ExtensionContext, TerminalOptions, ExtensionTerminalOptions } from 'vscode'; |
7 | 7 | import { doesNotThrow, equal, ok, deepEqual, throws } from 'assert'; |
8 | 8 |
|
9 | 9 | // Disable terminal tests: |
@@ -168,8 +168,10 @@ import { doesNotThrow, equal, ok, deepEqual, throws } from 'assert'; |
168 | 168 | const terminal = window.createTerminal(options); |
169 | 169 | try { |
170 | 170 | equal(terminal.name, 'foo'); |
171 | | - deepEqual(terminal.creationOptions, options); |
172 | | - throws(() => (<any>terminal.creationOptions).name = 'bad', 'creationOptions should be readonly at runtime'); |
| 171 | + const terminalOptions = terminal.creationOptions as TerminalOptions; |
| 172 | + equal(terminalOptions.name, 'foo'); |
| 173 | + equal(terminalOptions.hideFromUser, true); |
| 174 | + throws(() => terminalOptions.name = 'bad', 'creationOptions should be readonly at runtime'); |
173 | 175 | } catch (e) { |
174 | 176 | done(e); |
175 | 177 | return; |
@@ -605,8 +607,10 @@ import { doesNotThrow, equal, ok, deepEqual, throws } from 'assert'; |
605 | 607 | const terminal = window.createTerminal(options); |
606 | 608 | try { |
607 | 609 | equal(terminal.name, 'foo'); |
608 | | - deepEqual(terminal.creationOptions, options); |
609 | | - throws(() => (<any>terminal.creationOptions).name = 'bad', 'creationOptions should be readonly at runtime'); |
| 610 | + const terminalOptions = terminal.creationOptions as ExtensionTerminalOptions; |
| 611 | + equal(terminalOptions.name, 'foo'); |
| 612 | + equal(terminalOptions.pty, pty); |
| 613 | + throws(() => terminalOptions.name = 'bad', 'creationOptions should be readonly at runtime'); |
610 | 614 | } catch (e) { |
611 | 615 | done(e); |
612 | 616 | } |
|
0 commit comments