2023-04-23 11:03:26 +02:00
|
|
|
import gotoAnythingStyleQuery from './gotoAnythingStyleQuery';
|
|
|
|
|
2024-01-05 16:15:47 +02:00
|
|
|
describe('search/gotoAnythingStyleQuery', () => {
|
2023-04-23 11:03:26 +02:00
|
|
|
|
|
|
|
it('should prepare queries', () => {
|
|
|
|
const testCases: [string, string][] = [
|
|
|
|
['hello', 'hello*'],
|
|
|
|
['hello welc', 'hello* welc*'],
|
2023-10-25 15:41:05 +02:00
|
|
|
['joplin://x-callback-url/openNote?id=3600e074af0e4b06aeb0ae76d3d96af7', 'joplin://x-callback-url/openNote?id=3600e074af0e4b06aeb0ae76d3d96af7'],
|
|
|
|
['3600e074af0e4b06aeb0ae76d3d96af7', '3600e074af0e4b06aeb0ae76d3d96af7'],
|
|
|
|
['', ''],
|
2023-04-23 11:03:26 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
for (const [input, expected] of testCases) {
|
|
|
|
const actual = gotoAnythingStyleQuery(input);
|
|
|
|
expect(actual).toBe(expected);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|