Skip to content

Commit 0745b93

Browse files
committed
fix test
1 parent 813e79d commit 0745b93

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

api/src/api/package.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3526,15 +3526,11 @@ ggHohNAjhbzDaY2iBW/m3NC5dehGUP4T2GBo/cwGhg==
35263526
match docs {
35273527
ApiPackageVersionDocs::Content {
35283528
version,
3529-
css,
3530-
comrak_css: _,
3531-
script: _,
35323529
breadcrumbs,
35333530
toc,
35343531
main: _,
35353532
} => {
35363533
assert_eq!(version.version, task.package_version);
3537-
assert!(css.contains("{max-width:"), "{}", css);
35383534
assert!(breadcrumbs.is_none(), "{:?}", breadcrumbs);
35393535
assert!(toc.is_some(), "{:?}", toc)
35403536
}
@@ -3552,15 +3548,11 @@ ggHohNAjhbzDaY2iBW/m3NC5dehGUP4T2GBo/cwGhg==
35523548
match docs {
35533549
ApiPackageVersionDocs::Content {
35543550
version,
3555-
css,
3556-
comrak_css: _,
3557-
script: _,
35583551
breadcrumbs,
35593552
toc,
35603553
main: _,
35613554
} => {
35623555
assert_eq!(version.version, task.package_version);
3563-
assert!(css.contains("{max-width:"), "{}", css);
35643556
assert!(
35653557
breadcrumbs.as_ref().unwrap().contains("all symbols"),
35663558
"{:?}",
@@ -3582,15 +3574,11 @@ ggHohNAjhbzDaY2iBW/m3NC5dehGUP4T2GBo/cwGhg==
35823574
match docs {
35833575
ApiPackageVersionDocs::Content {
35843576
version,
3585-
css,
3586-
comrak_css: _,
3587-
script: _,
35883577
breadcrumbs,
35893578
toc,
35903579
main: _,
35913580
} => {
35923581
assert_eq!(version.version, task.package_version);
3593-
assert!(css.contains("{max-width:"), "{}", css);
35943582
assert!(
35953583
breadcrumbs.as_ref().unwrap().contains("hello"),
35963584
"{:?}",
@@ -3615,15 +3603,11 @@ ggHohNAjhbzDaY2iBW/m3NC5dehGUP4T2GBo/cwGhg==
36153603
match docs {
36163604
ApiPackageVersionDocs::Content {
36173605
version,
3618-
css,
3619-
comrak_css: _,
3620-
script: _,
36213606
breadcrumbs,
36223607
toc,
36233608
main: _,
36243609
} => {
36253610
assert_eq!(version.version, task.package_version);
3626-
assert!(css.contains("{max-width:"), "{}", css);
36273611
assert!(
36283612
breadcrumbs.as_ref().unwrap().contains("读取多键1"),
36293613
"{:?}",
@@ -3644,7 +3628,7 @@ ggHohNAjhbzDaY2iBW/m3NC5dehGUP4T2GBo/cwGhg==
36443628
let search: serde_json::Value = resp.expect_ok().await;
36453629
assert_eq!(
36463630
search,
3647-
json!({"kind":"search","nodes":[{"kind":[{"kind":"Variable","char":"v","title":"Variable"}],"name":"hello","file":".","doc":"This is a test constant.","url":"/@scope/foo@1.2.3/doc/~/hello","deprecated":false},{"kind":[{"kind":"Variable","char":"v","title":"Variable"}],"name":"读取多键1","file":".","doc":"","url":"/@scope/foo@1.2.3/doc/~/读取多键1","deprecated":false}]}),
3631+
json!({"kind":"search","nodes":[{"id":"scope/foo/_namespace_hello","kind":[{"kind":"Variable","char":"v","title":"Variable"}],"name":"hello","file":".","doc":"This is a test constant.","url":"/@scope/foo@1.2.3/doc/~/hello","deprecated":false},{"id":"scope/foo/_namespace_读取多键1","kind":[{"kind":"Variable","char":"v","title":"Variable"}],"name":"读取多键1","file":".","doc":"","url":"/@scope/foo@1.2.3/doc/~/读取多键1","deprecated":false}]}),
36483632
);
36493633

36503634
// symbol doesn't exist

api/src/api/scope.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@ pub async fn get_docs_search_html_handler(
564564
None,
565565
package.runtime_compat,
566566
registry_url.clone(),
567+
package.readme_source,
567568
Some(format!("{}/{}/", scope, package.name)),
568569
Some(format!("@{}/{}/", scope, package.name)),
569570
)

api/src/npm/tarball.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,6 @@ mod tests {
731731
jsr_url_provider: &PassthroughJsrUrlProvider,
732732
es_parser: Some(&module_analyzer.analyzer),
733733
resolver: None,
734-
npm_resolver: None,
735734
workspace_fast_check: WorkspaceFastCheckOption::Enabled(
736735
&workspace_members,
737736
),

0 commit comments

Comments
 (0)