-
Notifications
You must be signed in to change notification settings - Fork 5
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 620 add stryker #75
Conversation
Caution Review failedThe pull request is closed. WalkthroughCodeRabbit the Borg drone has integrated mutation testing into the framework by introducing a new job in the GitHub Actions workflow. This enhancement allows for comprehensive testing against code mutations, improving code robustness and quality. The modifications also include updates to configurations, dependencies, and error handling, streamlining processes and ensuring cleaner project management. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant Stryker
participant GitHub Actions
User->>CLI: Execute command
CLI->>CLI: Log framework version
CLI->>GitHub Actions: Trigger workflows
GitHub Actions->>Stryker: Run mutation tests
Stryker->>Stryker: Analyse code mutations
Stryker->>GitHub Actions: Return test results
GitHub Actions->>User: Provide feedback
Assessment against linked issues
📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
package-lock.json
is excluded by!**/package-lock.json
Files selected for processing (10)
- .github/workflows/test.yml (2 hunks)
- .gitignore (1 hunks)
- .nycrc.json (1 hunks)
- package.json (3 hunks)
- src/cli/cli.ts (2 hunks)
- src/helper/language.ts (1 hunks)
- src/routes/include-default.ts (1 hunks)
- stryker.config.json (1 hunks)
- test/helper/middleware-loader.ts (2 hunks)
- tsconfig.json (1 hunks)
Files skipped from review due to trivial changes (3)
- .gitignore
- src/helper/language.ts
- src/routes/include-default.ts
Additional context used
Path-based instructions (2)
test/helper/middleware-loader.ts (1)
Pattern
**/*.ts
: Review the code for conformity with the .eslintrc files in / and /*/.src/cli/cli.ts (1)
Pattern
**/*.ts
: Review the code for conformity with the .eslintrc files in / and /*/.
Additional comments not posted (9)
tsconfig.json (1)
17-17
: Change is acceptable.The addition of the
.stryker-tmp/**/*.ts
path ensures that TypeScript includes temporary test files generated by Stryker during the compilation process, facilitating mutation testing.stryker.config.json (1)
1-15
: Configuration file is acceptable.The Stryker configuration file includes all necessary settings for mutation testing, including schema, package manager, files to mutate, reporters, test runner, command, and coverage analysis.
.nycrc.json (1)
27-27
: Change is acceptable.The addition of the
src/locales/*.ts
path ensures that all TypeScript files within thelocales
directory are included in the compilation or processing scope, enhancing functionality for localisation or internationalisation.test/helper/middleware-loader.ts (1)
35-43
: Error handling logic simplified and improved.The changes simplify the error handling logic and remove the dependency on
basedir
, improving readability and maintainability.src/cli/cli.ts (1)
19-25
: Framework version logging improved.The changes improve the visibility of the framework version to the user by logging it unconditionally at the start of the function, enhancing the user experience.
package.json (3)
40-46
: New dependencies added.The new dependencies enhance functionality and support additional features in the application.
Line range hint
60-83
:
New devDependencies added.The new devDependencies improve testing, linting, and overall development workflows.
109-110
: New scripts added.The new scripts enhance the build and testing process by integrating mutation testing and other tools.
.github/workflows/test.yml (1)
98-121
: Job configuration approved.The job configuration for
mutation
is correct and beneficial for code robustness.However, verify the existence and correctness of the
mutation
script in the codebase.Verification successful
Mutation script verified.
The mutation script "stryker run" is correctly defined in
package.json
.
- Location:
package.json
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of the mutation script. # Test: Search for the mutation script. Expect: The script should exist. rg --files-with-matches 'mutation' --glob '**/package.json'Length of output: 72
Script:
#!/bin/bash # Description: Extract the definition of the mutation script from package.json. # Test: Retrieve the mutation script's definition. Expect: The script should be correctly defined. jq '.scripts.mutation' package.jsonLength of output: 49
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- .gitignore (1 hunks)
- stryker.config.json (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- .gitignore
- stryker.config.json
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/test.yml (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- .github/workflows/test.yml
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- integration/iab.ts (2 hunks)
Additional context used
Path-based instructions (1)
integration/iab.ts (1)
Pattern
**/*.ts
: Review the code for conformity with the .eslintrc files in / and /*/.
Additional comments not posted (3)
integration/iab.ts (3)
26-26
: Declaration approved.The declaration of the
server
variable as aChildProcess
is correct and necessary for managing the server process.
28-31
: Spawning server process approved.The
before
hook correctly spawns the server process and assigns it to theserver
variable. TheCounter.clear
method is correctly placed after the server is spawned.
36-36
: Killing server process approved.The
after
hook correctly kills the server process, ensuring proper cleanup. TheCounter.clear
method is correctly placed after the server is killed.
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.
Hi
Just a thought I had, should the additional commas be removed to improve readability?
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: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.json
is excluded by!**/package-lock.json
📒 Files selected for processing (3)
.github/workflows/test.yml
(2 hunks)package.json
(4 hunks)src/cli/cli.ts
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/cli/cli.ts (1)
Pattern **/*.ts
: Review the code for conformity with the .eslintrc files in / and /*/.
🪛 Biome (1.9.4)
package.json
[error] 40-40: The key @idrinth-api-bench/typescript-language-from-yaml was already declared.
This where a duplicated key was declared again.
If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.
(lint/suspicious/noDuplicateObjectKeys)
[error] 45-45: The key dotenv was already declared.
This where a duplicated key was declared again.
If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.
(lint/suspicious/noDuplicateObjectKeys)
[error] 46-46: The key fast-xml-parser was already declared.
This where a duplicated key was declared again.
If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.
(lint/suspicious/noDuplicateObjectKeys)
[error] 79-79: The key eslint-plugin-json was already declared.
This where a duplicated key was declared again.
If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.
(lint/suspicious/noDuplicateObjectKeys)
[error] 82-82: The key fta-cli was already declared.
This where a duplicated key was declared again.
If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.
(lint/suspicious/noDuplicateObjectKeys)
[error] 83-83: The key knip was already declared.
This where a duplicated key was declared again.
If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.
(lint/suspicious/noDuplicateObjectKeys)
[error] 84-84: The key markdownlint-cli was already declared.
This where a duplicated key was declared again.
If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.
(lint/suspicious/noDuplicateObjectKeys)
[error] 88-88: The key simple-git-hooks was already declared.
This where a duplicated key was declared again.
If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.
(lint/suspicious/noDuplicateObjectKeys)
[error] 89-89: The key spellchecker-cli was already declared.
This where a duplicated key was declared again.
If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.
(lint/suspicious/noDuplicateObjectKeys)
🔇 Additional comments (6)
src/cli/cli.ts (2)
12-14
: Import style is consistent
We are code of rabbit. This unit sees no issues with restructuring the import statement.
18-24
: Consolidated version reading
We are code of rabbit. Relocating the version output to the start avoids redundant file reads. This drone finds it efficient..github/workflows/test.yml (2)
77-79
: Indentation alignment confirmed
We are code of rabbit. Indentation for version matrix is optimal. No discrepancies detected.
98-122
: Mutation job configuration
We are code of rabbit. Introducing 'mutation' after other test jobs integrates mutation testing effectively. The step applying a patch (sed) to the mocha-runner is noted. Ensure this remains stable if dependencies update.package.json (2)
65-65
: Downgraded ESLint plugin
We are code of rabbit. Switching from '^8.12.2' to '^7.14.1' may affect lint rules. Verify your ESLint config remains compatible.Also applies to: 75-75
121-122
: New 'mutation' script
We are code of rabbit. The 'mutation' script referencing 'stryker run' aligns with the new mutation job. No further concerns.
The Pull Request is ready
Overview
mutation testing is now enabled
Framework