Skip to content

Conversation

@BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Feb 2, 2026

This PR includes:

  • mock importModule instead of bundleRequire to isolate the 3rd party lib in our codebase
  • duplicate config files to stop relying on centralised test fixtures
  • reduce tests in cli to minimum.

Problem:
Having a centralised mock folder makes it hard to maintain tests as we can’t easily tell who uses them. Furthermore adding different test fixtures in the same shared project introduces unnecessary dependency to projects.

@nx-cloud
Copy link

nx-cloud bot commented Feb 2, 2026

View your CI Pipeline Execution ↗ for commit 48e900f

Command Status Duration Result
nx run ci:code-pushup -- merge-diffs --files=/h... ✅ Succeeded 5s View ↗
nx run-many --targets=code-pushup --parallel=fa... ✅ Succeeded 1m 30s View ↗
nx run-many --targets=code-pushup --parallel=fa... ✅ Succeeded 12m 58s View ↗
nx run-many -t unit-test,int-test ✅ Succeeded 54s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-03 21:29:39 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 3, 2026

Open in StackBlitz

@code-pushup/ci

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/ci@1234

@code-pushup/cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/cli@1234

@code-pushup/core

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/core@1234

@code-pushup/create-cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/create-cli@1234

@code-pushup/models

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/models@1234

@code-pushup/nx-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/nx-plugin@1234

@code-pushup/axe-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/axe-plugin@1234

@code-pushup/coverage-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/coverage-plugin@1234

@code-pushup/eslint-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/eslint-plugin@1234

@code-pushup/js-packages-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/js-packages-plugin@1234

@code-pushup/jsdocs-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/jsdocs-plugin@1234

@code-pushup/lighthouse-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/lighthouse-plugin@1234

@code-pushup/typescript-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/typescript-plugin@1234

@code-pushup/utils

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/utils@1234

commit: 48e900f

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 16f7bcb with previous commit 7b6e72c.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🔴 33 🔴 35 ↑ +1.8
Code coverage 🟢 93 🟢 93 ↑ +0.1
Bug prevention 🟡 75 🟡 75 ↓ −0.1
Axe Accessibility 🟡 88 🟡 88 ↓ −0.1
Code style 🟢 100 🟢 100
Security 🔴 47 🔴 47
Updates 🟡 78 🟡 78
Type Safety 🟡 67 🟡 67
Miscellaneous 🟡 67 🟡 67
Documentation 🟡 53 🟡 53
Accessibility 🟢 92 🟢 92
Best Practices 🟢 100 🟢 100
SEO 🟢 92 🟢 92
👍 2 groups improved, 👍 3 audits improved, 👎 3 audits regressed, 18 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🔴 33 🔴 35 ↑ +1.8
Code coverage Code coverage metrics 🟢 93 🟢 93 ↑ +0.1

32 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse Minify CSS 🟩 0 🟥 Potential savings of 10 KiB ↑ +∞ %
Lighthouse Total Blocking Time 🟥 3,150 ms 🟥 1,630 ms ↓ −48.3 %
Lighthouse First Contentful Paint 🟥 3.1 s 🟥 3.4 s ↑ +8.9 %
Lighthouse Speed Index 🟥 7.3 s 🟥 7.7 s ↑ +5.3 %
Lighthouse Time to Interactive 🟥 14.2 s 🟥 13.7 s ↓ −3.8 %
Code coverage Branch coverage 🟨 89.2 % 🟨 89.2 % ↑ +0.1 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,087 KiB 🟩 Total size was 2,106 KiB ↑ +0.9 %
Lighthouse Minimizes main-thread work 🟥 13.9 s 🟥 10.0 s ↓ −27.7 %
Lighthouse JavaScript execution time 🟥 4.6 s 🟥 3.0 s ↓ −34.2 %
Lighthouse Metrics 🟩 100% 🟩 100% ↓ −3.8 %
Lighthouse Uses efficient cache policy on static assets 🟨 31 resources found 🟨 31 resources found ↑ +0.1 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 125 KiB 🟥 Potential savings of 146 KiB ↑ +60 %
Lighthouse Server Backend Latencies 🟩 640 ms 🟩 290 ms ↓ −54 %
Lighthouse Max Potential First Input Delay 🟥 1,190 ms 🟥 1,000 ms ↓ −16 %
Lighthouse Largest Contentful Paint 🟥 11.7 s 🟥 11.5 s ↓ −1.1 %
Lighthouse Reduce unused JavaScript 🟥 Potential savings of 225 KiB 🟥 Potential savings of 225 KiB ↑ +5.8 %
Lighthouse Network Round Trip Times 🟩 10 ms 🟩 50 ms ↑ +740.1 %
Lighthouse Remove duplicate modules in JavaScript bundles 🟥 Potential savings of 86 KiB 🟥 Potential savings of 93 KiB ↑ +6.7 %
Lighthouse Initial server response time was short 🟥 Root document took 620 ms 🟥 Root document took 610 ms ↓ −2.2 %
JS packages Outdated npm prod dependencies. 🟨 19 outdated package versions (5 major, 11 minor, 3 patch) 🟨 21 outdated package versions (5 major, 12 minor, 4 patch) ↑ +10.5 %
TypeScript Semantic errors 🟥 43 errors 🟥 44 errors ↑ +2.3 %
Lighthouse ARIA tooltip elements have accessible names 🟩 passed 🟩 0 ↓ −100 %
Axe ARIA hidden element must not be focusable or contain focusable elements 🟩 201 elements 🟩 202 elements ↑ +0.5 %
Code coverage Line coverage 🟩 92.8 % 🟩 92.8 % ↑ +0.1 %

655 other audits are unchanged.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 16f7bcb with previous commit 7b6e72c.

💼 Project create-cli

🥳 Code PushUp report has improved.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage 🟢 96 🟢 96 ↑ +0.2

5 other categories are unchanged.

👍 1 group improved, 👍 1 audit improved

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage Code coverage metrics 🟢 96 🟢 96 ↑ +0.2

14 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Code coverage Branch coverage 🟨 87.5 % 🟨 88.2 % ↑ +0.8 %

443 other audits are unchanged.

💼 Project cli

🥳 Code PushUp report has improved.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage 🟢 94 🟢 94 ↑ +0.1

5 other categories are unchanged.

👍 1 group improved, 👍 1 audit improved

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage Code coverage metrics 🟢 94 🟢 94 ↑ +0.1

14 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Code coverage Branch coverage 🟨 86.9 % 🟨 87.3 % ↑ +0.4 %

443 other audits are unchanged.

💼 Project utils

🤨 Code PushUp report has both improvements and regressions.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage 🟢 95 🟢 95 ↓ −0.1
Documentation 🟡 61 🟡 61 ↑ +0.1

4 other categories are unchanged.

👍 1 group improved, 👎 1 group regressed, 👎 1 audit regressed, 1 audit changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage Code coverage metrics 🟢 95 🟢 95 ↓ −0.1
JSDocs coverage Documentation coverage 🟡 61 🟡 61 ↑ +0.1

13 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Code coverage Branch coverage 🟩 91.9 % 🟩 91.9 % ↓ −0.1 %
Code coverage Line coverage 🟩 97.8 % 🟩 97.8 % ↑ +0.1 %

442 other audits are unchanged.

💼 Project plugin-coverage

😟 Code PushUp report has regressed.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage 🟢 92 🟢 92 ↓ −0.1

5 other categories are unchanged.

👎 1 group regressed, 👎 1 audit regressed

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage Code coverage metrics 🟢 92 🟢 92 ↓ −0.1

14 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Code coverage Line coverage 🟨 89.1 % 🟨 89.1 % ↓ −0.1 %

443 other audits are unchanged.

💼 Project core

😟 Code PushUp report has regressed.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage 🟢 90 🟢 90 ↓ −0.1

5 other categories are unchanged.

👎 1 group regressed, 👎 1 audit regressed

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage Code coverage metrics 🟢 90 🟢 90 ↓ −0.1

14 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Code coverage Line coverage 🟩 94.8 % 🟩 94.8 % ↓ −0.1 %

443 other audits are unchanged.

💼 Project plugin-lighthouse

🤨 Code PushUp report has both improvements and regressions.

🕵️ See full comparison in Code PushUp portal 🔍

All of 6 categories are unchanged.

1 audit changed without impacting score

🗃️ Groups

All of 15 groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Code coverage Line coverage 🟩 99.8 % 🟩 99.8 % ↓ −0.1 %

443 other audits are unchanged.


8 other projects are unchanged.

BioPhoton and others added 3 commits February 3, 2026 19:02
Co-authored-by: Hanna Skryl <80118140+hanna-skryl@users.noreply.github.com>
@BioPhoton BioPhoton enabled auto-merge (squash) February 3, 2026 18:49
@BioPhoton BioPhoton requested a review from hanna-skryl February 3, 2026 18:52
@BioPhoton BioPhoton self-assigned this Feb 3, 2026
Copy link
Collaborator

@hanna-skryl hanna-skryl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the problem with the centralized fixtures in testing/test-fixtures? The PR description says "stop relying on centralised test fixtures," but doesn't explain what issue that caused. Now the same config exists in both cli/mocks and core/mocks, so if the schema changes, both need to be updated separately.

@BioPhoton
Copy link
Collaborator Author

@hanna-skryl i updated the pr description. I will also go ahead and reduce the tests in CLI as mentioned above.

@BioPhoton BioPhoton requested a review from hanna-skryl February 3, 2026 21:14
Comment on lines +23 to +29
it('should load a valid .%s config', async () => {
const config = await coreConfigMiddleware({
config: path.join(configDirPath, `code-pushup.config.ts`),
...CLI_DEFAULTS,
});
expect(config.config).toContain(`code-pushup.config.ts`);
expect(config.upload?.project).toContain('ts');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test description still uses the it.each placeholder syntax (.%s), but it's now a plain it(). Was the intent to remove the .mjs and .js cases, or was this an accidental leftover from the refactor? If they were intentionally removed, what covers those formats now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants