3
3
4
4
import * as assert from "assert" ;
5
5
import * as vscode from "vscode" ;
6
- import { suiteSetup } from "mocha" ;
6
+ import { suiteSetup , setup , teardown } from "mocha" ;
7
7
import { ISECompatibilityFeature } from "../../src/features/ISECompatibility" ;
8
8
import utils = require( "../utils" ) ;
9
9
10
10
suite ( "ISECompatibility feature" , ( ) => {
11
11
suiteSetup ( utils . ensureExtensionIsActivated ) ;
12
+ setup ( async ( ) => { await vscode . commands . executeCommand ( "PowerShell.EnableISEMode" ) ; } ) ;
13
+ teardown ( async ( ) => { await vscode . commands . executeCommand ( "PowerShell.DisableISEMode" ) ; } ) ;
12
14
13
15
test ( "It sets ISE Settings" , async ( ) => {
14
- await vscode . commands . executeCommand ( "PowerShell.EnableISEMode" ) ;
15
16
for ( const iseSetting of ISECompatibilityFeature . settings ) {
16
17
const currently = vscode . workspace . getConfiguration ( iseSetting . path ) . get ( iseSetting . name ) ;
17
18
assert . strictEqual ( currently , iseSetting . value ) ;
@@ -31,7 +32,6 @@ suite("ISECompatibility feature", () => {
31
32
} ) . timeout ( 10000 ) ;
32
33
33
34
test ( "It leaves Theme after being changed after enabling ISE Mode" , async ( ) => {
34
- await vscode . commands . executeCommand ( "PowerShell.EnableISEMode" ) ;
35
35
assert . strictEqual ( vscode . workspace . getConfiguration ( "workbench" ) . get ( "colorTheme" ) , "PowerShell ISE" ) ;
36
36
37
37
await vscode . workspace . getConfiguration ( "workbench" ) . update ( "colorTheme" , "Dark+" , true ) ;
0 commit comments