@@ -39,7 +39,6 @@ suite('Report Issue Command', () => {
3939 let interpreterService : IInterpreterService ;
4040 let configurationService : IConfigurationService ;
4141 let appEnvironment : IApplicationEnvironment ;
42- let expectedIssueBody : string ;
4342 let getExtensionsStub : sinon . SinonStub ;
4443
4544 setup ( async ( ) => {
@@ -84,17 +83,6 @@ suite('Report Issue Command', () => {
8483 ) ;
8584 await reportIssueCommandHandler . activate ( ) ;
8685
87- const issueTemplatePath = path . join (
88- EXTENSION_ROOT_DIR_FOR_TESTS ,
89- 'src' ,
90- 'test' ,
91- 'common' ,
92- 'application' ,
93- 'commands' ,
94- 'issueTemplate.md' ,
95- ) ;
96- expectedIssueBody = fs . readFileSync ( issueTemplatePath , 'utf8' ) ;
97-
9886 getExtensionsStub . returns ( [
9987 {
10088 id : 'ms-python.python' ,
@@ -126,17 +114,16 @@ suite('Report Issue Command', () => {
126114 ) ;
127115 const expectedData = fs . readFileSync ( userDataTemplatePath , 'utf8' ) ;
128116
129- const args : [ string , { extensionId : string ; issueBody : string ; data : string } ] = capture <
117+ const args : [ string , { extensionId : string ; issueBody : string } ] = capture <
130118 AllCommands ,
131- { extensionId : string ; issueBody : string ; data : string }
119+ { extensionId : string ; issueBody : string }
132120 > ( cmdManager . executeCommand ) . last ( ) ;
133121
134122 verify ( cmdManager . registerCommand ( Commands . ReportIssue , anything ( ) , anything ( ) ) ) . once ( ) ;
135123 verify ( cmdManager . executeCommand ( 'workbench.action.openIssueReporter' , anything ( ) ) ) . once ( ) ;
136124 expect ( args [ 0 ] ) . to . be . equal ( 'workbench.action.openIssueReporter' ) ;
137- const { issueBody, data } = args [ 1 ] ;
138- expect ( issueBody ) . to . be . equal ( expectedIssueBody ) ;
139- expect ( data ) . to . be . equal ( expectedData ) ;
125+ const { issueBody } = args [ 1 ] ;
126+ expect ( issueBody ) . to . be . equal ( expectedData ) ;
140127 } ) ;
141128
142129 test ( 'Test if issue body is filled when only including settings which are explicitly set' , async ( ) => {
@@ -167,16 +154,15 @@ suite('Report Issue Command', () => {
167154 ) ;
168155 const expectedData = fs . readFileSync ( userDataTemplatePath , 'utf8' ) ;
169156
170- const args : [ string , { extensionId : string ; issueBody : string ; data : string } ] = capture <
157+ const args : [ string , { extensionId : string ; issueBody : string } ] = capture <
171158 AllCommands ,
172- { extensionId : string ; issueBody : string ; data : string }
159+ { extensionId : string ; issueBody : string }
173160 > ( cmdManager . executeCommand ) . last ( ) ;
174161
175162 verify ( cmdManager . executeCommand ( 'workbench.action.openIssueReporter' , anything ( ) ) ) . once ( ) ;
176163 expect ( args [ 0 ] ) . to . be . equal ( 'workbench.action.openIssueReporter' ) ;
177- const { issueBody, data } = args [ 1 ] ;
178- expect ( issueBody ) . to . be . equal ( expectedIssueBody ) ;
179- expect ( data ) . to . be . equal ( expectedData ) ;
164+ const { issueBody } = args [ 1 ] ;
165+ expect ( issueBody ) . to . be . equal ( expectedData ) ;
180166 } ) ;
181167 test ( 'Should send telemetry event when run Report Issue Command' , async ( ) => {
182168 const sendTelemetryStub = sinon . stub ( Telemetry , 'sendTelemetryEvent' ) ;
0 commit comments