(
private sessionManager: SessionManager,
private logger: ILogger,
)
| 18 | private invokePesterStubScriptPath: string; |
| 19 | |
| 20 | constructor( |
| 21 | private sessionManager: SessionManager, |
| 22 | private logger: ILogger, |
| 23 | ) { |
| 24 | this.invokePesterStubScriptPath = path.resolve( |
| 25 | __dirname, |
| 26 | "../modules/PowerShellEditorServices/InvokePesterStub.ps1", |
| 27 | ); |
| 28 | this.commands = [ |
| 29 | // File context-menu command - Run Pester Tests |
| 30 | vscode.commands.registerCommand( |
| 31 | "PowerShell.RunPesterTestsFromFile", |
| 32 | (fileUri?) => { |
| 33 | return this.launchAllTestsInActiveEditor( |
| 34 | LaunchType.Run, |
| 35 | fileUri, |
| 36 | ); |
| 37 | }, |
| 38 | ), |
| 39 | |
| 40 | // File context-menu command - Debug Pester Tests |
| 41 | vscode.commands.registerCommand( |
| 42 | "PowerShell.DebugPesterTestsFromFile", |
| 43 | (fileUri?) => { |
| 44 | return this.launchAllTestsInActiveEditor( |
| 45 | LaunchType.Debug, |
| 46 | fileUri, |
| 47 | ); |
| 48 | }, |
| 49 | ), |
| 50 | |
| 51 | // This command is provided for usage by PowerShellEditorServices (PSES) only |
| 52 | vscode.commands.registerCommand( |
| 53 | "PowerShell.RunPesterTests", |
| 54 | ( |
| 55 | uriString, |
| 56 | runInDebugger, |
| 57 | describeBlockName?, |
| 58 | describeBlockLineNumber?, |
| 59 | outputPath?, |
| 60 | ) => { |
| 61 | return this.launchTests( |
| 62 | vscode.Uri.parse(uriString), |
| 63 | runInDebugger, |
| 64 | describeBlockName, |
| 65 | describeBlockLineNumber, |
| 66 | outputPath, |
| 67 | ); |
| 68 | }, |
| 69 | ), |
| 70 | ]; |
| 71 | } |
| 72 | |
| 73 | public dispose(): void { |
| 74 | for (const command of this.commands) { |
nothing calls this directly
no test coverage detected