-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISSUE-16 - Add unit tests #112
Conversation
Add unit testing to several of the newly refactored modules, ahead of migrating to use cargo_metadata Unit tests added to: * cli * format - print * format - table * format - tree * format * graph * rs_file * scan * traversal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great refactoring 🥇 Looks good to me!
@@ -152,27 +167,66 @@ pub fn print_text_tree_lines_as_table( | |||
let name = name.unwrap(); | |||
|
|||
// TODO: Fix the alignment on macOS (others too?) | |||
println!("{}{}{}", table_row_empty(), tree_vines, name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! This change was long overdue :)
@@ -8,20 +8,21 @@ use cargo::core::PackageId; | |||
pub enum TextTreeLine { | |||
/// A text line for a package | |||
Package { id: PackageId, tree_vines: String }, | |||
/// There're extra dependencies comming and we should print a group header, | |||
/// There are extra dependencies coming and we should print a group header, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
add_graph_node_if_not_present_and_edge( | ||
dependency, | ||
dependency_package_id, | ||
graph, | ||
index, | ||
pending_packages, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup!
Awesome! Thanks for the review! |
Add unit testing to several of the newly refactored modules, ahead of
migrating to use cargo_metadata
Unit tests added to: