()
| 103 | |
| 104 | #[test] |
| 105 | fn checks_for_duplicate_dependencies() -> Result<()> { |
| 106 | let project = Project::new("foo", true)?; |
| 107 | project.update_manifest(|mut doc| { |
| 108 | doc["package"]["metadata"]["component"]["dependencies"]["foo:bar"] = value("1.2.3"); |
| 109 | Ok(doc) |
| 110 | })?; |
| 111 | |
| 112 | project |
| 113 | .cargo_component(["add", "foo:bar"]) |
| 114 | .assert() |
| 115 | .stderr(contains( |
| 116 | "cannot add dependency `foo:bar` as it conflicts with an existing dependency", |
| 117 | )) |
| 118 | .failure(); |
| 119 | |
| 120 | Ok(()) |
| 121 | } |
| 122 | |
| 123 | #[tokio::test(flavor = "multi_thread", worker_threads = 1)] |
| 124 | async fn prints_modified_manifest_for_dry_run() -> Result<()> { |
nothing calls this directly
no test coverage detected