Skip to content

Commit

Permalink
fix(plugins/changelog): make sure it should contain on repo folder
Browse files Browse the repository at this point in the history
  • Loading branch information
dalisoft committed Apr 25, 2024
1 parent d5bfaba commit f8fad85
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/plugins/changelog.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,24 @@ test_plugin_changelog_1() {

bash "$ROOT_DIR/release.sh" --plugins=git,changelog --quiet

assert_matches "v0.0.1" "$(cat CHANGELOG.md)"
assert_matches "initial commit" "$(cat CHANGELOG.md)"
assert_matches "v0.0.1" "$(cat "$REPO_FOLDER"/CHANGELOG.md)"
assert_matches "initial commit" "$(cat "$REPO_FOLDER"/CHANGELOG.md)"
}

test_plugin_changelog_2_dryun() {
git commit --quiet --m "fix: bump version" --allow-empty

bash "$ROOT_DIR/release.sh" --plugins=git,changelog --quiet --dry-run

assert_not_matches "v0.0.2" "$(cat CHANGELOG.md)"
assert_not_matches "bump version" "$(cat CHANGELOG.md)"
assert_not_matches "v0.0.2" "$(cat "$REPO_FOLDER"/CHANGELOG.md)"
assert_not_matches "bump version" "$(cat "$REPO_FOLDER"/CHANGELOG.md)"
}

test_plugin_changelog_3_update() {
git commit --quiet -m "feat: feat version" --allow-empty

bash "$ROOT_DIR/release.sh" --plugins=git,changelog --quiet

assert_matches "v0.1.0" "$(cat CHANGELOG.md)"
assert_matches "feat version" "$(cat CHANGELOG.md)"
assert_matches "v0.1.0" "$(cat "$REPO_FOLDER"/CHANGELOG.md)"
assert_matches "feat version" "$(cat "$REPO_FOLDER"/CHANGELOG.md)"
}

0 comments on commit f8fad85

Please sign in to comment.