-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add process exit handler #1212
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 6950284
☁️ Nx Cloud last updated this comment at |
@code-pushup/ci
@code-pushup/cli
@code-pushup/create-cli
@code-pushup/core
@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 3d307db with previous commit 7d3681c. 🕵️ See full comparison in Code PushUp portal 🔍 🏷️ Categories👍 2 groups improved, 👎 1 group regressed, 👍 5 audits improved, 👎 5 audits regressed, 14 audits changed without impacting score🗃️ Groups
31 other groups are unchanged. 🛡️ Audits
655 other audits are unchanged. |
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared current commit 3d307db with previous commit 7d3681c. 💼 Project
|
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Documentation | 🔴 36 | 🔴 36 | |
| Code coverage | 🟢 94 | 🟢 94 |
4 other categories are unchanged.
👎 2 groups regressed, 👍 2 audits improved, 👎 4 audits regressed
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| JSDocs coverage | Documentation coverage | 🔴 36 | 🔴 36 | |
| Code coverage | Code coverage metrics | 🟢 94 | 🟢 94 |
13 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| JSDocs coverage | Types coverage | 🟥 59 undocumented types | 🟥 63 undocumented types | |
| JSDocs coverage | Variables coverage | 🟥 43 undocumented variables | 🟥 46 undocumented variables | |
| Code coverage | Branch coverage | 🟩 91.8 % | 🟩 91.7 % | |
| Code coverage | Line coverage | 🟩 93.8 % | 🟩 93.9 % | |
| Code coverage | Function coverage | 🟩 95.8 % | 🟩 95.9 % | |
| JSDocs coverage | Functions coverage | 🟥 246 undocumented functions | 🟥 247 undocumented functions |
438 other audits are unchanged.
13 other projects are unchanged.
|
I will add int tests now that i examined the logger code.☝️ |
| it('should call onClose for normal exit', () => { | ||
| expect(() => installExitHandlers({ onClose })).not.toThrow(); | ||
|
|
||
| (process as any).emit('exit'); | ||
|
|
||
| expect(onClose).toHaveBeenCalledTimes(1); | ||
| expect(onClose).toHaveBeenCalledWith(undefined, { kind: 'exit' }); | ||
| expect(onError).not.toHaveBeenCalled(); | ||
| expect(processExitSpy).not.toHaveBeenCalled(); | ||
| }); |
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.
Nitpick: The test emits exit without a code, but in Node.js, the exit event always receives a code. Should this be emit('exit', 0)?
related to #1197