@@ -68,6 +68,7 @@ suite('Sorting', () => {
6868 const edit = ( await sorter . provideDocumentSortImportsEdits ( textDocument . uri ) ) ! ;
6969 expect ( edit . entries ( ) ) . to . be . lengthOf ( 1 ) ;
7070 const edits = edit . entries ( ) [ 0 ] [ 1 ] ;
71+ expect ( edits . length ) . to . equal ( 4 ) ;
7172 assert . equal (
7273 edits . filter ( ( value ) => value . newText === EOL && value . range . isEqual ( new Range ( 2 , 0 , 2 , 0 ) ) ) . length ,
7374 1 ,
@@ -81,15 +82,14 @@ suite('Sorting', () => {
8182 assert . equal (
8283 edits . filter (
8384 ( value ) =>
84- value . newText ===
85- `from rope.base import libutils${ EOL } from rope.refactor.extract import ExtractMethod, ExtractVariable${ EOL } from rope.refactor.rename import Rename${ EOL } ` &&
86- value . range . isEqual ( new Range ( 6 , 0 , 6 , 0 ) )
85+ value . newText === `from rope.refactor.extract import ExtractMethod, ExtractVariable${ EOL } ` &&
86+ value . range . isEqual ( new Range ( 15 , 0 , 15 , 0 ) )
8787 ) . length ,
8888 1 ,
8989 'Text not found'
9090 ) ;
9191 assert . equal (
92- edits . filter ( ( value ) => value . newText === '' && value . range . isEqual ( new Range ( 13 , 0 , 18 , 0 ) ) ) . length ,
92+ edits . filter ( ( value ) => value . newText === '' && value . range . isEqual ( new Range ( 16 , 0 , 18 , 0 ) ) ) . length ,
9393 1 ,
9494 '"" not found'
9595 ) ;
@@ -129,7 +129,7 @@ suite('Sorting', () => {
129129 test ( 'With Changes and Config in Args' , async ( ) => {
130130 await updateSetting (
131131 'sortImports.args' ,
132- [ '-sp' , path . join ( sortingPath , 'withconfig' ) ] ,
132+ [ '-- sp' , path . join ( sortingPath , 'withconfig' ) ] ,
133133 Uri . file ( sortingPath ) ,
134134 ConfigurationTarget . Workspace
135135 ) ;
@@ -146,7 +146,7 @@ suite('Sorting', () => {
146146 test ( 'With Changes and Config in Args (via Command)' , async ( ) => {
147147 await updateSetting (
148148 'sortImports.args' ,
149- [ '-sp' , path . join ( sortingPath , 'withconfig' ) ] ,
149+ [ '-- sp' , path . join ( sortingPath , 'withconfig' ) ] ,
150150 Uri . file ( sortingPath ) ,
151151 configTarget
152152 ) ;
0 commit comments