Skip to content

Commit f4c5417

Browse files
Update tests
1 parent 63e1dac commit f4c5417

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/testsuite/search.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ use std::path::{Path, PathBuf};
99
fn read_book_index(root: &Path) -> serde_json::Value {
1010
let index = root.join("book/searchindex.js");
1111
let index = std::fs::read_to_string(index).unwrap();
12-
let index = index.trim_start_matches("window.search = JSON.parse('");
13-
let index = index.trim_end_matches("');");
12+
let index =
13+
index.trim_start_matches("window.search = Object.assign(window.search, JSON.parse('");
14+
let index = index.trim_end_matches("'));");
1415
// We need unescape the string as it's supposed to be an escaped JS string.
1516
serde_json::from_str(&index.replace("\\'", "'").replace("\\\\", "\\")).unwrap()
1617
}

0 commit comments

Comments
 (0)