33
44import * as assert from "assert" ;
55import * as vscode from "vscode" ;
6- import { suiteSetup } from "mocha" ;
6+ import { suiteSetup , setup , teardown } from "mocha" ;
77import { ISECompatibilityFeature } from "../../src/features/ISECompatibility" ;
88import utils = require( "../utils" ) ;
99
1010suite ( "ISECompatibility feature" , ( ) => {
1111 suiteSetup ( utils . ensureExtensionIsActivated ) ;
12+ setup ( async ( ) => { await vscode . commands . executeCommand ( "PowerShell.EnableISEMode" ) ; } ) ;
13+ teardown ( async ( ) => { await vscode . commands . executeCommand ( "PowerShell.DisableISEMode" ) ; } ) ;
1214
1315 test ( "It sets ISE Settings" , async ( ) => {
14- await vscode . commands . executeCommand ( "PowerShell.EnableISEMode" ) ;
1516 for ( const iseSetting of ISECompatibilityFeature . settings ) {
1617 const currently = vscode . workspace . getConfiguration ( iseSetting . path ) . get ( iseSetting . name ) ;
1718 assert . strictEqual ( currently , iseSetting . value ) ;
@@ -31,7 +32,6 @@ suite("ISECompatibility feature", () => {
3132 } ) . timeout ( 10000 ) ;
3233
3334 test ( "It leaves Theme after being changed after enabling ISE Mode" , async ( ) => {
34- await vscode . commands . executeCommand ( "PowerShell.EnableISEMode" ) ;
3535 assert . strictEqual ( vscode . workspace . getConfiguration ( "workbench" ) . get ( "colorTheme" ) , "PowerShell ISE" ) ;
3636
3737 await vscode . workspace . getConfiguration ( "workbench" ) . update ( "colorTheme" , "Dark+" , true ) ;
0 commit comments