Skip to main content

semver_common/mock/
mock_commit_map.rs

1pub mod commit_map {
2    use crate::{CommitMap, mock};
3
4    pub fn create() -> CommitMap {
5        let mut commit_map = CommitMap::new();
6        let change_feat = mock::change::create("^feat(.|\n)*$", "Feature", 2);
7        let change_fix = mock::change::create("^fix(.|\n)*$", "Fix", 3);
8        let commit_one = mock::commit::create("feat(scope): a test header");
9        let commit_two = mock::commit::create("feat(scope): a test header two");
10        let commit_three = mock::commit::create("fix(scope): a test header three");
11        commit_map.insert(&change_feat, commit_one).unwrap();
12        commit_map.insert(&change_feat, commit_two).unwrap();
13        commit_map.insert(&change_fix, commit_three).unwrap();
14        commit_map
15    }
16}