Skip to content

Commit 8a537bb

Browse files
committed
Refactor test suite names to align with the corresponding utility function names
1 parent 30fdb10 commit 8a537bb

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

‎packages/vscode/src/commands/apply-chat-response-command/utils/clipboard-parser/clipboard-parser.spec.ts‎

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('clipboard-parser', () => {
1414
)
1515
}
1616

17-
describe('parse_clipboard_multiple_files', () => {
17+
describe('parse_multiple_files', () => {
1818
it('should parse comment filename format', () => {
1919
const text = load_test_case_file(
2020
'comment-filename',
@@ -166,7 +166,7 @@ describe('clipboard-parser', () => {
166166
)
167167
})
168168

169-
it('should ignore workspace prefixes when has_single_root=true', () => {
169+
it('should treat workspace prefix as part of file path in a single-root workspace', () => {
170170
const text = load_test_case_file(
171171
'with-workspace-prefix',
172172
'with-workspace-prefix.txt'
@@ -257,21 +257,6 @@ describe('clipboard-parser', () => {
257257
)
258258
})
259259

260-
it('should handle inner backticks within a diff block', () => {
261-
const text = load_test_case_file(
262-
'diff-inner-backticks',
263-
'diff-inner-backticks.txt'
264-
)
265-
const result = parse_response(text, true)
266-
267-
expect(result.type).toBe('patches')
268-
expect(result.patches).toHaveLength(1)
269-
expect(result.patches![0].file_path).toBe('src/index.ts')
270-
expect(result.patches![0].content).toBe(
271-
load_test_case_file('diff-inner-backticks', 'file-1.txt')
272-
)
273-
})
274-
275260
it('should handle inner backticks within a code block', () => {
276261
const text = load_test_case_file('inner-backticks', 'inner-backticks.txt')
277262
const result = parse_multiple_files({
@@ -386,7 +371,7 @@ describe('clipboard-parser', () => {
386371
})
387372
})
388373

389-
describe('parse_clipboard_content', () => {
374+
describe('parse_response', () => {
390375
it('should parse direct diff format in variant a', () => {
391376
const text = load_test_case_file(
392377
'diff-direct-variant-a',
@@ -821,7 +806,22 @@ describe('clipboard-parser', () => {
821806
)
822807
})
823808

824-
it('should parse multiple diff files format with inner triple backticks', () => {
809+
it('should handle inner backticks within a diff block', () => {
810+
const text = load_test_case_file(
811+
'diff-inner-backticks',
812+
'diff-inner-backticks.txt'
813+
)
814+
const result = parse_response(text, true)
815+
816+
expect(result.type).toBe('patches')
817+
expect(result.patches).toHaveLength(1)
818+
expect(result.patches![0].file_path).toBe('src/index.ts')
819+
expect(result.patches![0].content).toBe(
820+
load_test_case_file('diff-inner-backticks', 'file-1.txt')
821+
)
822+
})
823+
824+
it('should parse diff with a nested code block', () => {
825825
const text = load_test_case_file(
826826
'diff-inner-triple-backticks',
827827
'diff-inner-triple-backticks.txt'

0 commit comments

Comments
 (0)