-
-
Notifications
You must be signed in to change notification settings - Fork 2
🚀 v2.1.1 #15
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
Conversation
## Walkthrough
The patch increments the package version to 2.1.1, documents a bug fix in the changelog, and updates the `map_keywords` function in `normalize_feature.R` to only replace step keywords at the start of lines, preserving indentation. Related tests and test snapshots are updated to verify this behavior and reflect source line changes. The mutation testing workflow script was also updated to use a new function call.
## Changes
| File(s) | Change Summary |
|------------------------------------------------|----------------------------------------------------------------------------------------------------|
| DESCRIPTION | Incremented package version from 2.1.0 to 2.1.1 and added "muttest" to Suggests |
| NEWS.md | Added changelog entry for version 2.1.1, documenting a bug fix in feature file normalization |
| R/normalize_feature.R | Modified `map_keywords` to anchor keyword replacements to line starts, preserving indentation |
| tests/testthat/test-normalize_feature.R | Added test to ensure only leading step keywords are replaced, not those in step descriptions |
| tests/testthat/_snaps/local/examples.md | Updated error backtrace line numbers in test snapshot output |
| .github/workflows/test-mutation.yml | Replaced `muttest::test_plan()` with `muttest::plan()` and `muttest::test()` with `muttest::muttest()` in mutation testing workflow |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant Test as Test Suite
participant Normalize as normalize_feature()
participant Map as map_keywords()
Test->>Normalize: Call normalize_feature() with feature lines
Normalize->>Map: map_keywords(line)
Map-->>Normalize: Replace step keywords only at start of lines
Normalize-->>Test: Return normalized feature linesPoem
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tests/testthat/test-normalize_feature.R (1)
78-104: Great test coverage for the bug fix, but fix the typo in the test name.The test logic correctly validates that keywords are only replaced at the start of lines, not within step descriptions. However, there's a typo in the test name.
Apply this diff to fix the typo:
- it("shouldn replace only keywords, not words in step descriptions", { + it("should replace only keywords, not words in step descriptions", {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
DESCRIPTION(1 hunks)NEWS.md(1 hunks)R/normalize_feature.R(1 hunks)tests/testthat/_snaps/local/examples.md(2 hunks)tests/testthat/test-normalize_feature.R(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: test-coverage
- GitHub Check: ubuntu-latest (release)
- GitHub Check: ubuntu-latest (oldrel-1)
- GitHub Check: ubuntu-latest (devel)
- GitHub Check: test-coverage
- GitHub Check: ubuntu-latest (devel)
- GitHub Check: ubuntu-latest (release)
- GitHub Check: ubuntu-latest (oldrel-1)
- GitHub Check: test-coverage
- GitHub Check: test-coverage
🔇 Additional comments (4)
DESCRIPTION (1)
4-4: LGTM! Version increment is appropriate for a patch release.The version bump from 2.1.0 to 2.1.1 correctly follows semantic versioning for a patch release containing bug fixes.
tests/testthat/_snaps/local/examples.md (1)
330-330: Snapshot update reflects internal code changes.The line number change from 17 to 37 in the backtrace correctly reflects modifications to the
cucumber/R/test.Rfile that shifted the location of the error call.Also applies to: 339-339
R/normalize_feature.R (1)
8-16: Excellent bug fix! Keyword replacement now properly anchored to line starts.The changes correctly implement anchored pattern matching that:
- Only replaces keywords at the beginning of lines (with optional leading whitespace)
- Preserves indentation by capturing and reusing whitespace with
\\1- Prevents unintended replacements of keywords within step descriptions
This addresses the normalization issue documented in the changelog.
NEWS.md (1)
1-4: Well-documented changelog entry for the patch release.The changelog correctly documents the 2.1.1 release with a clear description of the normalization bug fix and proper reference to the associated pull request.
Summary by CodeRabbit
Bug Fixes
Tests
Chores