mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-15 14:22:43 +00:00
20 lines
691 B
TypeScript
20 lines
691 B
TypeScript
import assert from 'node:assert/strict'
|
|
import test from 'node:test'
|
|
|
|
import { resolveRenamePath } from './git-review-ops'
|
|
|
|
test('resolveRenamePath: plain path is unchanged', () => {
|
|
assert.equal(resolveRenamePath('src/a.ts'), 'src/a.ts')
|
|
})
|
|
|
|
test('resolveRenamePath: simple rename resolves to the new path', () => {
|
|
assert.equal(resolveRenamePath('old.ts => new.ts'), 'new.ts')
|
|
})
|
|
|
|
test('resolveRenamePath: brace rename resolves to the new path', () => {
|
|
assert.equal(resolveRenamePath('src/{old => new}/file.ts'), 'src/new/file.ts')
|
|
})
|
|
|
|
test('resolveRenamePath: brace rename collapsing a segment', () => {
|
|
assert.equal(resolveRenamePath('src/{lib => }/file.ts'), 'src/file.ts')
|
|
})
|