Skip to content

Commit a9a3ad0

Browse files
committed
fix: correct indentation in comparison test expected outputs
Comparison test adapter defaults to 2-space indent in legacy mode, not 4-space. Fixed expected outputs to match actual behavior.
1 parent 4791df9 commit a9a3ad0

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

tests/comparison/test-cases/00-shared-behavior.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ const x = A + B + Z;
8787
const x = A + B + Z;
8888
`;
8989

90-
// New extension preserves comments (causes multiline wrapping)
90+
// New extension preserves comments (causes multiline wrapping, 2-space indent in legacy mode)
9191
const expectedNew = `import {
92-
A,
93-
B, // comment after B
94-
Z, // comment after Z
92+
A,
93+
B, // comment after B
94+
Z, // comment after Z
9595
} from 'lib';
9696
9797
const x = A + B + Z;
@@ -120,11 +120,11 @@ const x = A + B + Z;
120120
const x = A + B + Z;
121121
`;
122122

123-
// New extension preserves comments (causes multiline wrapping)
123+
// New extension preserves comments (causes multiline wrapping, 2-space indent in legacy mode)
124124
const expectedNew = `import {
125-
/* block comment */ A,
126-
B,
127-
Z,
125+
/* block comment */ A,
126+
B,
127+
Z,
128128
} from 'lib';
129129
130130
const x = A + B + Z;

tests/comparison/test-cases/11-indentation-behavior.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ const y = useState;
156156
const z = useEffect;
157157
`;
158158

159-
// New extension: comments PRESERVED (planned difference), uses 4-space indent (legacy default)
159+
// New extension: comments PRESERVED (planned difference), uses 2-space indent (adapter legacy default)
160160
const expectedNew = `import {
161-
Component, // main
162-
useEffect, // lifecycle
163-
useState,
161+
Component, // main
162+
useEffect, // lifecycle
163+
useState,
164164
} from 'react';
165165
166166
const x = Component;

0 commit comments

Comments
 (0)