Skip to content
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

fix: should close app on afterAll hook #158

Merged
merged 2 commits into from
Feb 16, 2023
Merged

fix: should close app on afterAll hook #158

merged 2 commits into from
Feb 16, 2023

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Feb 15, 2023

cnpm/cnpmcore#408 avoid app beforeClose logic not coverage problem

@fengmk2 fengmk2 added the bug label Feb 15, 2023
@fengmk2 fengmk2 requested a review from killagu February 15, 2023 13:22
Copy link
Contributor

@killagu killagu left a comment

Choose a reason for hiding this comment

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

LGTM

@fengmk2 fengmk2 marked this pull request as draft February 15, 2023 14:15
@codecov
Copy link

codecov bot commented Feb 16, 2023

Codecov Report

Base: 85.72% // Head: 55.41% // Decreases project coverage by -30.31% ⚠️

Coverage data is based on head (3fde889) compared to base (a130dd3).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #158       +/-   ##
===========================================
- Coverage   85.72%   55.41%   -30.31%     
===========================================
  Files          27       24        -3     
  Lines        2571     2501       -70     
  Branches      464      173      -291     
===========================================
- Hits         2204     1386      -818     
- Misses        367     1115      +748     
Impacted Files Coverage Δ
register.js 100.00% <100.00%> (ø)
lib/mock_httpclient.js 4.59% <0.00%> (-92.35%) ⬇️
lib/mock_custom_loader.js 18.18% <0.00%> (-81.82%) ⬇️
app/middleware/cluster_app_mock.js 9.75% <0.00%> (-81.71%) ⬇️
lib/cluster.js 42.31% <0.00%> (-52.76%) ⬇️
lib/mock_agent.js 50.00% <0.00%> (-50.00%) ⬇️
lib/supertest.js 52.63% <0.00%> (-47.37%) ⬇️
lib/http_test.js 53.84% <0.00%> (-40.00%) ⬇️
app/extend/application.js 60.86% <0.00%> (-35.27%) ⬇️
lib/app.js 75.08% <0.00%> (-22.87%) ⬇️
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@fengmk2 fengmk2 marked this pull request as ready for review February 16, 2023 03:06
@fengmk2 fengmk2 merged commit 081b157 into master Feb 16, 2023
@fengmk2 fengmk2 deleted the afterAll-close branch February 16, 2023 03:07
fengmk2 pushed a commit that referenced this pull request Feb 16, 2023
[skip ci]

## [5.10.5](v5.10.4...v5.10.5) (2023-02-16)

### Bug Fixes

* should close app on afterAll hook ([#158](#158)) ([081b157](081b157))
@github-actions
Copy link

🎉 This PR is included in version 5.10.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@killagu
Copy link
Contributor

killagu commented Feb 21, 2023

mocha parallel mode 下,afterAll 会在每个 test file 执行完成之后执行一次。这里不能关闭。

killagu added a commit that referenced this pull request Feb 21, 2023
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