-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #745 from visualize-admin/fix/search
- Loading branch information
Showing
14 changed files
with
164 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { highlight } from "./query-search-score-utils"; | ||
|
||
describe("highlighting search words in query", () => { | ||
it("should work", () => { | ||
const tests = [ | ||
["Pollution is bad", "bad", "Pollution is <b>bad</b>"], | ||
[ | ||
"The assessment of bathing waters is made on the basis of hygienic quality using E.coli and intestina", | ||
"Bathing", | ||
"The assessment of <b>bathing</b> waters is made on the basis of hygienic quality using E.coli and intestina", | ||
], | ||
[ | ||
"GEB - Einmalvergütung für Photovoltaikanlagen", | ||
"Einmalvergütung", | ||
"GEB - <b>Einmalvergütung</b> für Photovoltaikanlagen", | ||
], | ||
] as [string, string, string][]; | ||
for (const t of tests) { | ||
const result = highlight(t[0], t[1]); | ||
expect(result).toEqual(t[2]); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
3ea4bf0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
visualization-tool – ./
visualization-tool-git-main-ixt1.vercel.app
visualization-tool-ixt1.vercel.app
visualization-tool-alpha.vercel.app