Skip to content

Commit

Permalink
Update testing stub
Browse files Browse the repository at this point in the history
  • Loading branch information
bglw committed Sep 9, 2023
1 parent 193b696 commit 3638cc7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pagefind_ui/default/_dev_files/pagefind/_pagefind_stub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const get_subs = (term, title, url, words) => {
subs.push({
title,
url,
weightedLocations: [{ weight: 1, location: 1}, { weight: 2, location: 2}, { weight: 1, location: 3}],
locations: [1, 2, 3],
excerpt: words.slice(0, 4).join(" "),
});
Expand All @@ -62,6 +63,7 @@ const get_subs = (term, title, url, words) => {
title: `${i}/${sub_count}: ${get_a_word()} ${get_a_word()} ${get_a_word()}`,
url: `${url}#${get_a_word()}-${i}`,
locations: locs,
weightedLocations: locs.map(location => { return { weight: 1, location}}),
excerpt:
words
.slice(
Expand Down Expand Up @@ -102,6 +104,7 @@ const stub_results = (term): PagefindSearchResult[] => {
excerpt,
word_count: 30,
locations: [7],
weightedLocations: [{ weight: 1, location: 7}],
filters: {
color: [get_a_word()],
},
Expand Down

0 comments on commit 3638cc7

Please sign in to comment.