parent
2741546bed
commit
ea13b23349
2 changed files with 11 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
import {describe, expect, test} from 'vitest';
|
||||
import {strSubMatch, calcMatchedWeight, filterRepoFilesWeighted} from './repo-findfile.js';
|
||||
import {strSubMatch, calcMatchedWeight, filterRepoFilesWeighted, escapePath} from './repo-findfile.js';
|
||||
|
||||
describe('Repo Find Files', () => {
|
||||
test('strSubMatch', () => {
|
||||
|
@ -32,4 +32,9 @@ describe('Repo Find Files', () => {
|
|||
expect(res).toHaveLength(2);
|
||||
expect(res[0].matchResult).toEqual(['', 'word', '.txt']);
|
||||
});
|
||||
|
||||
test('escapePath', () => {
|
||||
expect(escapePath('a/b/c')).toEqual('a/b/c');
|
||||
expect(escapePath('a/b/ c')).toEqual('a/b/%20c');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue