Skip to content

Commit

Permalink
Update tests to add versions
Browse files Browse the repository at this point in the history
  • Loading branch information
riquito committed Apr 5, 2024
1 parent 6869bfb commit 8408b9b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ fn it_finds_a_package_with_range() {
.assert();

assert.success().stdout(
r#"└─ [email protected] || ^2.0.0
r#"└─ foolib@2.0.0 (via 1.2.3 || ^2.0.0)
"#,
);
}
Expand All @@ -168,7 +168,7 @@ fn it_finds_a_package_without_range() {
.assert();

assert.success().stdout(
r#"└─ [email protected] || ^2.0.0
r#"└─ foolib@2.0.0 (via 1.2.3 || ^2.0.0)
"#,
);
}
Expand All @@ -183,7 +183,7 @@ fn it_finds_a_package_whose_dep_is_using_npm_protocol() {
.assert();

assert.success().stdout(
r#"└─ buzz@^1.1.1
r#"└─ buzz@1.1.2 (via ^1.1.1)
"#,
);
}
Expand All @@ -197,7 +197,9 @@ fn it_finds_a_package_in_a_yarn_lock_with_only_direct_deps() {
.write_stdin(YARN_LOCK_V6_ONLY_DIRECT_DEPS)
.assert();

assert.success().stdout("└─ [email protected] || ^2.0.0\n");
assert
.success()
.stdout("└─ [email protected] (via 1.2.3 || ^2.0.0)\n");
}

#[test]
Expand All @@ -222,12 +224,12 @@ fn it_ignores_entries_with_the_patch_protocol() {
.assert();

assert.success().stdout(
r#"└─ vite@^5.2.0
├─ fsevents@~2.3.3
│ └─ node-gyp@latest
└─ rollup@^4.13.0
└─ fsevents@~2.3.2
└─ node-gyp@latest
r#"└─ vite@5.2.4 (via ^5.2.0)
├─ fsevents@2.3.3 (via ~2.3.3)
│ └─ node-gyp@10.0.1 (via latest)
└─ rollup@4.13.0 (via ^4.13.0)
└─ fsevents@2.3.3 (via ~2.3.2)
└─ node-gyp@10.0.1 (via latest)
"#,
);
}

0 comments on commit 8408b9b

Please sign in to comment.