Skip to content

Commit 3d25c65

Browse files
committed
fixed refactor test to save (for linux)
1 parent e40252c commit 3d25c65

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/test/extension.refactor.extract.method.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ suite('Method Extraction', () => {
187187
ignoreErrorHandling = true;
188188
assert.fail('No error', 'Error', 'Extraction should fail with an error', '');
189189
}
190+
return textEditor.document.save();
191+
}).then(()=>{
190192
assert.equal(ch.output.length, 0, 'Output channel is not empty');
191193
assert.equal(textDocument.lineAt(241).text.trim().indexOf('def newmethod'), 0, 'New Method not created');
192194
assert.equal(textDocument.lineAt(239).text.trim().startsWith('self.newmethod'), true, 'New Method not being used');

src/test/extension.refactor.extract.var.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ suite('Variable Extraction', () => {
187187
ignoreErrorHandling = true;
188188
assert.fail('No error', 'Error', 'Extraction should fail with an error', '');
189189
}
190+
return textEditor.document.save();
191+
}).then(()=>{
190192
assert.equal(ch.output.length, 0, 'Output channel is not empty');
191193
assert.equal(textDocument.lineAt(234).text.trim().indexOf('newvariable'), 0, 'New Variable not created');
192194
assert.equal(textDocument.lineAt(234).text.trim().endsWith('= "STARTED"'), true, 'Started Text Assigned to variable');

0 commit comments

Comments
 (0)