Skip to content

Commit cd3efa1

Browse files
committed
fix var extraction tests
1 parent b972ba7 commit cd3efa1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ class MockTextDocument implements vscode.TextDocument {
9494
suite('Variable Extraction', () => {
9595
// Hack hac hack
9696
const oldExecuteCommand = vscode.commands.executeCommand;
97+
const options: vscode.TextEditorOptions = { cursorStyle: vscode.TextEditorCursorStyle.Line, insertSpaces: true, lineNumbers: vscode.TextEditorLineNumbersStyle.Off, tabSize: 4 };
9798
suiteSetup(done => {
9899
fs.copySync(refactorSourceFile, refactorTargetFile, { clobber: true });
99100
pythonSettings.pythonPath = PYTHON_PATH;
@@ -127,7 +128,7 @@ suite('Variable Extraction', () => {
127128
const DIFF = '--- a/refactor.py\n+++ b/refactor.py\n@@ -232,7 +232,8 @@\n sys.stdout.flush()\n \n def watch(self):\n- self._write_response("STARTED")\n+ myNewVariable = "STARTED"\n+ self._write_response(myNewVariable)\n while True:\n try:\n self._process_request(self._input.readline())\n';
128129
let expectedTextEdits = getTextEditsFromPatch(mockTextDoc.getText(), DIFF);
129130

130-
return proxy.extractVariable<RenameResponse>(mockTextDoc, 'myNewVariable', refactorTargetFile, rangeOfTextToExtract)
131+
return proxy.extractVariable<RenameResponse>(mockTextDoc, 'myNewVariable', refactorTargetFile, rangeOfTextToExtract, options)
131132
.then(response => {
132133
if (shouldError) {
133134
ignoreErrorHandling = true;

0 commit comments

Comments
 (0)