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

test(publisher-ers): fix fs-extra mocks #2813

Merged
merged 1 commit into from
Apr 21, 2022
Merged

Conversation

erickzhao
Copy link
Member

@erickzhao erickzhao commented Apr 20, 2022

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summarize your changes: #2766 added some tests to the trunk that were broken because #2706 added new code paths that weren't accounted for in the mocks.

@codecov
Copy link

codecov bot commented Apr 20, 2022

Codecov Report

Merging #2813 (656b65e) into master (4b07c1f) will increase coverage by 1.71%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2813      +/-   ##
==========================================
+ Coverage   73.90%   75.62%   +1.71%     
==========================================
  Files          77       77              
  Lines        2357     2359       +2     
  Branches      436      438       +2     
==========================================
+ Hits         1742     1784      +42     
+ Misses        465      423      -42     
- Partials      150      152       +2     
Impacted Files Coverage Δ
...lisher/electron-release-server/src/PublisherERS.ts 86.95% <100.00%> (+60.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6069ebe...656b65e. Read the comment docs.

@erickzhao erickzhao requested a review from VerteDinde April 20, 2022 20:13
Copy link
Member

@clavin clavin left a comment

Choose a reason for hiding this comment

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

Looks good, though one question: was the package-lock.json file for a test fixture meant to be committed?

@erickzhao
Copy link
Member Author

@clavin yep, it's a bolt monorepo thing. I imported a sinon stub into the tests to mock out fs-extra, but sinon wasn't installed in the package's dependencies. Without this lockfile change, the linter detects the import as extraneous.

https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-extraneous-import.md

@erickzhao erickzhao merged commit 9fcd08f into master Apr 21, 2022
@erickzhao erickzhao deleted the ers/fs-extra-test branch April 21, 2022 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants