@@ -31,6 +31,7 @@ test('it returns all sorted nodes', () => {
3131 importOrderSeparation : false ,
3232 importOrderGroupNamespaceSpecifiers : false ,
3333 importOrderSortSpecifiers : false ,
34+ importOrderSortByLength : null ,
3435 importOrderSideEffects : true ,
3536 } ) as ImportDeclaration [ ] ;
3637
@@ -76,6 +77,7 @@ test('it returns all sorted nodes case-insensitive', () => {
7677 importOrderSeparation : false ,
7778 importOrderGroupNamespaceSpecifiers : false ,
7879 importOrderSortSpecifiers : false ,
80+ importOrderSortByLength : null ,
7981 importOrderSideEffects : true ,
8082 } ) as ImportDeclaration [ ] ;
8183
@@ -121,6 +123,7 @@ test('it returns all sorted nodes with sort order', () => {
121123 importOrderSeparation : false ,
122124 importOrderGroupNamespaceSpecifiers : false ,
123125 importOrderSortSpecifiers : false ,
126+ importOrderSortByLength : null ,
124127 importOrderSideEffects : true ,
125128 } ) as ImportDeclaration [ ] ;
126129
@@ -166,6 +169,7 @@ test('it returns all sorted nodes with sort order case-insensitive', () => {
166169 importOrderSeparation : false ,
167170 importOrderGroupNamespaceSpecifiers : false ,
168171 importOrderSortSpecifiers : false ,
172+ importOrderSortByLength : null ,
169173 importOrderSideEffects : true ,
170174 } ) as ImportDeclaration [ ] ;
171175 expect ( getSortedNodesNames ( sorted ) ) . toEqual ( [
@@ -210,6 +214,7 @@ test('it returns all sorted import nodes with sorted import specifiers', () => {
210214 importOrderSeparation : false ,
211215 importOrderGroupNamespaceSpecifiers : false ,
212216 importOrderSortSpecifiers : true ,
217+ importOrderSortByLength : null ,
213218 importOrderSideEffects : true ,
214219 } ) as ImportDeclaration [ ] ;
215220 expect ( getSortedNodesNames ( sorted ) ) . toEqual ( [
@@ -254,6 +259,7 @@ test('it returns all sorted import nodes with sorted import specifiers with case
254259 importOrderSeparation : false ,
255260 importOrderGroupNamespaceSpecifiers : false ,
256261 importOrderSortSpecifiers : true ,
262+ importOrderSortByLength : null ,
257263 importOrderSideEffects : true ,
258264 } ) as ImportDeclaration [ ] ;
259265 expect ( getSortedNodesNames ( sorted ) ) . toEqual ( [
@@ -298,6 +304,7 @@ test('it returns all sorted nodes with custom third party modules', () => {
298304 importOrderCaseInsensitive : true ,
299305 importOrderGroupNamespaceSpecifiers : false ,
300306 importOrderSortSpecifiers : false ,
307+ importOrderSortByLength : null ,
301308 importOrderSideEffects : true ,
302309 } ) as ImportDeclaration [ ] ;
303310 expect ( getSortedNodesNames ( sorted ) ) . toEqual ( [
@@ -323,6 +330,7 @@ test('it returns all sorted nodes with namespace specifiers at the top', () => {
323330 importOrderSeparation : false ,
324331 importOrderGroupNamespaceSpecifiers : true ,
325332 importOrderSortSpecifiers : false ,
333+ importOrderSortByLength : null ,
326334 importOrderSideEffects : true ,
327335 } ) as ImportDeclaration [ ] ;
328336
@@ -358,6 +366,7 @@ test('it returns the default separations if `importOrderSeparation` is false', (
358366 importOrderGroupNamespaceSpecifiers : false ,
359367 importOrderSortSpecifiers : false ,
360368 importOrderSideEffects : true ,
369+ importOrderSortByLength : null ,
361370 } ) ;
362371 expect ( getSeparationData ( sorted ) ) . toEqual ( [
363372 { type : 'ImportDeclaration' , value : 'XY' } ,
@@ -384,6 +393,7 @@ test('it returns default import module separations', () => {
384393 importOrderGroupNamespaceSpecifiers : false ,
385394 importOrderSortSpecifiers : false ,
386395 importOrderSideEffects : true ,
396+ importOrderSortByLength : null ,
387397 } ) ;
388398 expect ( getSeparationData ( sorted ) ) . toEqual ( [
389399 { type : 'ImportDeclaration' , value : 'XY' } ,
@@ -415,6 +425,7 @@ test('it returns targeted import module separations', () => {
415425 importOrderGroupNamespaceSpecifiers : false ,
416426 importOrderSortSpecifiers : false ,
417427 importOrderSideEffects : true ,
428+ importOrderSortByLength : null ,
418429 } ) ;
419430 expect ( getSeparationData ( sorted ) ) . toEqual ( [
420431 { type : 'ImportDeclaration' , value : 'XY' } ,
@@ -447,6 +458,7 @@ test('it never returns a separation at the top of the list (leading separator)',
447458 importOrderGroupNamespaceSpecifiers : false ,
448459 importOrderSortSpecifiers : false ,
449460 importOrderSideEffects : true ,
461+ importOrderSortByLength : null ,
450462 } ) ;
451463 expect ( getSeparationData ( sorted ) ) . toEqual ( [
452464 { type : 'ImportDeclaration' , value : './test' } ,
@@ -467,6 +479,7 @@ test('it never returns a separation at the top of the list (zero preceding impor
467479 importOrderGroupNamespaceSpecifiers : false ,
468480 importOrderSortSpecifiers : false ,
469481 importOrderSideEffects : true ,
482+ importOrderSortByLength : null ,
470483 } ) ;
471484 expect ( getSeparationData ( sorted ) ) . toEqual ( [
472485 { type : 'ImportDeclaration' , value : './test' } ,
0 commit comments