test: Add snapshot for sublimeSearch and a first test (no-changelog) (#13794)

This commit is contained in:
Charlie Kolb
2025-04-14 11:56:11 +02:00
committed by GitHub
parent e1246ab65c
commit 00038be81a
5 changed files with 13293 additions and 2 deletions

View File

@@ -98,7 +98,8 @@ export function searchNodes(searchFilter: string, items: INodeCreateElement[]) {
// In order to support the old search we need to remove the 'trigger' part
const trimmedFilter = searchFilter.toLowerCase().replace('trigger', '').trimEnd();
// We have a snapshot of this call in sublimeSearch.test.ts to assert practical order for some cases
// Please kindly update the test call if you modify the weights here, and ideally regenerate the snapshot as described in its file.
const result = (
sublimeSearch<INodeCreateElement>(trimmedFilter, items, [
{ key: 'properties.displayName', weight: 1.3 },