Skip to content

chore(tests): adapt Stryker mutator to pnpm and fix markup in README for badges - #11893

Merged
alumni merged 3 commits into
typeorm:masterfrom
OSA413:master
Jan 5, 2026
Merged

alumni merged 3 commits into
typeorm:masterfrom
OSA413:master

Conversation

@OSA413

@OSA413 OSA413 commented Jan 5, 2026

Copy link
Copy Markdown
Collaborator

Description of change

This fixes running the Stryker mutator with pnpm (explanation is here) and fix markup in the README for badges (an extra space broke the display of the last two badges after merging #11253).

Again, thank to this guide for noting a special case of using pnpm with stryker: https://stryker-mutator.io/docs/stryker-js/troubleshooting/

Tested locally and on my fork to make it to the mutation testing process (after the dry run of the tests).

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • This pull request links relevant issues as Fixes #00000
  • There are new or updated tests validating the change (tests/**.test.ts)
  • Documentation has been updated to reflect this change (docs/docs/**.md)

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jan 5, 2026 •

Copy link
Copy Markdown

PR Code Suggestions ✨

Latest suggestions up to f9b7f10

CategorySuggestion                                                                                                                                    Impact
General
Standardize HTML quote usage

Standardize HTML attribute quotes in README.md by changing the single quotes in
the Stryker badge link to double quotes for consistency with other badges.

README.md [14-15]

 <a href="https://coveralls.io/github/typeorm/typeorm?branch=master"><img src="https://coveralls.io/repos/github/typeorm/typeorm/badge.svg?branch=master" alt="Coverage Status"/></a>
-<a href='https://dashboard.stryker-mutator.io/reports/github.com/typeorm/typeorm/master'><img src='https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Ftypeorm%2Ftypeorm%2Fmaster' alt='Mutation testing badge' /></a>
+<a href="https://dashboard.stryker-mutator.io/reports/github.com/typeorm/typeorm/master"><img src="https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Ftypeorm%2Ftypeorm%2Fmaster" alt="Mutation testing badge" /></a>

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 3

__

Why: The suggestion correctly identifies an inconsistency in quote usage within the HTML badges, proposing a valid change that improves code style and maintainability.

Low
  • More

Previous suggestions

Suggestions up to commit 3f8b947
CategorySuggestion                                                                                                                                    Impact
Possible issue
Explicitly declare all Stryker plugins

Add the missing Stryker reporter plugins for html, dashboard, progress, and json
to the plugins array to ensure they are loaded correctly when using pnpm.

stryker.config.json [9]

-"plugins": ["@stryker-mutator/mocha-runner"],
+"plugins": [
+  "@stryker-mutator/mocha-runner",
+  "@stryker-mutator/html-reporter",
+  "@stryker-mutator/dashboard-reporter",
+  "@stryker-mutator/progress-reporter",
+  "@stryker-mutator/json-reporter"
+],
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies that with pnpm, Stryker plugins must be explicitly declared, and the current configuration is missing the required reporter plugins, which would cause a runtime failure.

High

@OSA413
OSA413 marked this pull request as draft January 5, 2026 21:19
@OSA413

OSA413 commented Jan 5, 2026

Copy link
Copy Markdown
Collaborator Author

I've tested qodo's suggestion and it looks like the report is properly generating. But I found that the source map is pointing to the build instead of the source. I'll investigate that first before merging.

@alumni

alumni commented Jan 5, 2026

Copy link
Copy Markdown
Collaborator

@OSA413

OSA413 commented Jan 5, 2026

Copy link
Copy Markdown
Collaborator Author

Maybe this would be nice to have too? https://stryker-mutator.io/docs/stryker-js/typescript-checker/

Once I figure out what's wrong with the setup, yes.

@OSA413

OSA413 commented Jan 5, 2026

Copy link
Copy Markdown
Collaborator Author

But I found that the source map is pointing to the build instead of the source

The issue is gone, probably because I used the wrong combination of enabled drivers with cut version of the tests (so that I don't have to wait for long). I think it can be checked now on the real repo now.

@OSA413
OSA413 marked this pull request as ready for review January 5, 2026 22:12
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Add missing Stryker reporter plugins

Add the missing Stryker reporter plugins (@stryker-mutator/html-reporter,
@stryker-mutator/dashboard-reporter, @stryker-mutator/json-reporter) to the
plugins array in stryker.config.json to prevent reporting errors.

stryker.config.json [9]

-"plugins": ["@stryker-mutator/mocha-runner"],
+"plugins": [
+  "@stryker-mutator/mocha-runner",
+  "@stryker-mutator/html-reporter",
+  "@stryker-mutator/dashboard-reporter",
+  "@stryker-mutator/json-reporter"
+],
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies that the Stryker configuration is incomplete and will fail during the reporting phase, as the necessary reporter plugins are missing from the plugins array.

High
  • More

@alumni alumni changed the title fix: adapt Stryker mutator to pnpm and fix markup in README for badges test: adapt Stryker mutator to pnpm and fix markup in README for badges Jan 5, 2026
@alumni alumni changed the title test: adapt Stryker mutator to pnpm and fix markup in README for badges chore(tests): adapt Stryker mutator to pnpm and fix markup in README for badges Jan 5, 2026
@alumni
alumni merged commit f3bfbf6 into typeorm:master Jan 5, 2026
10 checks passed
Cprakhar pushed a commit to Cprakhar/typeorm that referenced this pull request Jan 7, 2026
mgohin pushed a commit to mgohin/typeorm that referenced this pull request Jan 15, 2026
kranners pushed a commit to kranners/typeorm that referenced this pull request Mar 1, 2026
@pkuczynski pkuczynski added this to the 1.0 milestone Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants