1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00
joplin/packages/lib/services/search/gotoAnythingStyleQuery.test.ts

21 lines
643 B
TypeScript
Raw Normal View History

2023-04-23 11:03:26 +02:00
import gotoAnythingStyleQuery from './gotoAnythingStyleQuery';
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*'],
['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);
}
});
});