MCPcopy Create free account
hub / github.com/danvk/webdiff / rename

Function rename

ts/__tests__/util.test.ts:16–18  ·  view source on GitHub ↗
(a: string, b: string)

Source from the content-addressed store, hash-verified

14 ).toEqual('dir/file.json');
15
16 const rename = (a: string, b: string) => {
17 return filePairDisplayName({...props, type: 'move', a, b, num_add: 0, num_delete: 0});
18 };
19 expect(rename('file.json', 'renamed.json')).toEqual('{file → renamed}.json');
20 expect(rename('dir/file.json', 'dir/renamed.json')).toEqual('dir/{file → renamed}.json');
21 expect(rename('file.json', 'dir/file.json')).toEqual('{ → dir/}file.json');

Callers 1

util.test.tsFile · 0.85

Calls 1

filePairDisplayNameFunction · 0.90

Tested by

no test coverage detected