mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
* Remove low-value file, runtime and chat test cases * test: remove low-value shared contract and timing suites * test: remove leaking browser IPC mock suite * test: isolate legacy relay bridge transport fixture --------- Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
26 lines
896 B
TypeScript
26 lines
896 B
TypeScript
import { expect, it } from 'vitest'
|
|
import { parseQuickOpenQueryTarget } from './quick-open-query-target'
|
|
|
|
it.each([
|
|
['src/app.ts:12', { pathQuery: 'src/app.ts', line: 12 }],
|
|
['C:\\src\\app.ts:12:3', { pathQuery: 'C:\\src\\app.ts', line: 12, column: 3 }],
|
|
['\\\\server\\share\\app.ts:2', { pathQuery: '\\\\server\\share\\app.ts', line: 2 }],
|
|
['/home/a b/file.ts:7:8', { pathQuery: '/home/a b/file.ts', line: 7, column: 8 }],
|
|
['file:part:2', { pathQuery: 'file:part', line: 2 }]
|
|
])('parses the trailing location in %s', (query, target) => {
|
|
expect(parseQuickOpenQueryTarget(query)).toEqual(target)
|
|
})
|
|
|
|
it.each([
|
|
'C:12',
|
|
'file:0',
|
|
'file:1:0',
|
|
'file:1:',
|
|
'file:-2',
|
|
'file:1:9007199254740992',
|
|
'file::2',
|
|
'file:9007199254740992'
|
|
])('keeps invalid or ambiguous suffixes literal: %s', (query) => {
|
|
expect(parseQuickOpenQueryTarget(query)).toEqual({ pathQuery: query })
|
|
})
|