@@ -715,8 +715,11 @@ mod tests { |
715 | 715 | None, |
716 | 716 | ) |
717 | 717 | .await; |
718 | | - assert_eq!(installed_again, installed); |
719 | | - let (paths, calls) = tracked_npm_hosted(&common, &installed_again).await; |
| 718 | + // Since #605 the name-keyed resolver probes bundled trees itself, so |
| 719 | + // it already returns the aliases and the nested store's peers. Feed |
| 720 | + // the earlier, alias-free set to keep exercising alias expansion; |
| 721 | + // the resolver's own set is checked against the same result below. |
| 722 | + let (paths, calls) = tracked_npm_hosted(&common, &installed).await; |
720 | 723 | assert_eq!(calls.len(), 1); |
721 | 724 | let mut inputs = calls[0].clone(); |
722 | 725 | inputs.sort(); |
@@ -738,6 +741,9 @@ mod tests { |
738 | 741 | .len(), |
739 | 742 | paths.len() |
740 | 743 | ); |
| 744 | + let (mut resolved, _) = tracked_npm_hosted(&common, &installed_again).await; |
| 745 | + resolved.sort(); |
| 746 | + assert_eq!(resolved, expected, "the resolver's own copy set"); |
741 | 747 | } |
742 | 748 |
|
743 | 749 | #[cfg(unix)] |
@@ -768,14 +774,19 @@ mod tests { |
768 | 774 | None, |
769 | 775 | ) |
770 | 776 | .await; |
771 | | - assert!(installed.is_empty(), "{installed:?}"); |
772 | | - let (mut paths, calls) = tracked_npm_hosted(&common, &installed).await; |
| 777 | + // Since #605 the name-keyed resolver reaches the alias and its |
| 778 | + // sibling peers on its own. An alias-only set (what an alias-blind |
| 779 | + // resolver returns) must still expand to the same copies. |
| 780 | + let (mut paths, calls) = tracked_npm_hosted(&common, &HashMap::new()).await; |
773 | 781 | assert_eq!(calls, vec![vec![alias.clone()]]); |
774 | 782 | let mut expected = peers; |
775 | 783 | expected.push(alias); |
776 | 784 | paths.sort(); |
777 | 785 | expected.sort(); |
778 | 786 | assert_eq!(paths, expected); |
| 787 | + let (mut resolved, _) = tracked_npm_hosted(&common, &installed).await; |
| 788 | + resolved.sort(); |
| 789 | + assert_eq!(resolved, expected, "the resolver's own copy set"); |
779 | 790 | } |
780 | 791 |
|
781 | 792 | #[cfg(unix)] |
|