Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3d25c65

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

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

+2
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

+2
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)