-
Notifications
You must be signed in to change notification settings - Fork 14
chore: mock import module in favour of bundle require #1234
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
base: main
Are you sure you want to change the base?
Conversation
|
View your CI Pipeline Execution ↗ for commit 48e900f
☁️ Nx Cloud last updated this comment at |
@code-pushup/ci
@code-pushup/cli
@code-pushup/core
@code-pushup/create-cli
@code-pushup/models
@code-pushup/nx-plugin
@code-pushup/axe-plugin
@code-pushup/coverage-plugin
@code-pushup/eslint-plugin
@code-pushup/js-packages-plugin
@code-pushup/jsdocs-plugin
@code-pushup/lighthouse-plugin
@code-pushup/typescript-plugin
@code-pushup/utils
commit: |
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👍 2 groups improved, 👍 3 audits improved, 👎 3 audits regressed, 18 audits changed without impacting score🗃️ Groups
32 other groups are unchanged. 🛡️ Audits
655 other audits are unchanged. |
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared current commit 16f7bcb with previous commit 7b6e72c. 💼 Project
|
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Code coverage | 🟢 96 | 🟢 96 |
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 |
14 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| Code coverage | Branch coverage | 🟨 87.5 % | 🟨 88.2 % |
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 |
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 |
14 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| Code coverage | Branch coverage | 🟨 86.9 % | 🟨 87.3 % |
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 | |
| Documentation | 🟡 61 | 🟡 61 |
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 | |
| JSDocs coverage | Documentation coverage | 🟡 61 | 🟡 61 |
13 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| Code coverage | Branch coverage | 🟩 91.9 % | 🟩 91.9 % | |
| Code coverage | Line coverage | 🟩 97.8 % | 🟩 97.8 % |
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 |
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 |
14 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| Code coverage | Line coverage | 🟨 89.1 % | 🟨 89.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 |
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 |
14 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| Code coverage | Line coverage | 🟩 94.8 % | 🟩 94.8 % |
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 % |
443 other audits are unchanged.
8 other projects are unchanged.
Co-authored-by: Hanna Skryl <80118140+hanna-skryl@users.noreply.github.com>
hanna-skryl
left a comment
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.
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.
|
@hanna-skryl i updated the pr description. I will also go ahead and reduce the tests in CLI as mentioned above. |
| 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'); |
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.
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?
This PR includes:
clito 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.