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

refactor: update the ExtensionService APIs #342

Merged
merged 4 commits into from
Aug 20, 2021
Merged

Conversation

wewoor
Copy link
Collaborator

@wewoor wewoor commented Aug 19, 2021

Description

Refactor the ExtensionService and add unit tests for it.

Changes

  • Add getExtension and getAllExtensions methods
  • Private the extensions property, only allow access by public methods
  • Add remove method
  • Add public reset method for set the extensions to empty
  • Add comments for IExtensionService interface

How Has This Been Tested?

  • Add unit tests for the ExtensionService

wewoor added 2 commits August 19, 2021 10:09
Add new APIs, includes getExtension, getAllExtensions, remove and reset so on methods; add comments
for the IExtensionService interface
@wewoor wewoor added refactoring Refactor unit test The PR is for the unit test mainly labels Aug 19, 2021
@wewoor wewoor added this to the 0.9.0-alpha.5 milestone Aug 19, 2021
@wewoor wewoor self-assigned this Aug 19, 2021
@wewoor wewoor requested a review from ProfBramble August 19, 2021 02:25
@codecov
Copy link

codecov bot commented Aug 19, 2021

Codecov Report

Merging #342 (de84035) into main (20d6b93) will increase coverage by 3.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #342      +/-   ##
==========================================
+ Coverage   52.95%   56.05%   +3.09%     
==========================================
  Files         173      173              
  Lines        4604     4626      +22     
  Branches     1016     1017       +1     
==========================================
+ Hits         2438     2593     +155     
+ Misses       2138     2007     -131     
+ Partials       28       26       -2     
Impacted Files Coverage Δ
src/services/extensionService.ts 100.00% <100.00%> (+15.15%) ⬆️
src/model/workbench/editor.ts 62.06% <0.00%> (ø)
src/common/dom.ts 66.10% <0.00%> (+3.38%) ⬆️
src/components/select/option.tsx 100.00% <0.00%> (+75.00%) ⬆️
src/components/select/select.tsx 100.00% <0.00%> (+87.69%) ⬆️
src/services/problemsService.ts 100.00% <0.00%> (+92.64%) ⬆️

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 20d6b93...de84035. Read the comment docs.

@wewoor wewoor mentioned this pull request Aug 19, 2021
53 tasks
@wewoor wewoor closed this Aug 19, 2021
@wewoor wewoor deleted the test/extensionService branch August 19, 2021 03:24
@wewoor wewoor restored the test/extensionService branch August 19, 2021 03:26
@wewoor wewoor reopened this Aug 19, 2021
@wewoor wewoor requested a review from ProfBramble August 19, 2021 12:28
Copy link
Contributor

@ProfBramble ProfBramble left a comment

Choose a reason for hiding this comment

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

+1

@wewoor wewoor changed the title refactor: update the ExtensionService methods and interface refactor: update the ExtensionService APIs Aug 19, 2021
@wewoor wewoor merged commit 7848856 into main Aug 20, 2021
@wewoor wewoor deleted the test/extensionService branch August 20, 2021 09:41
wewoor added a commit that referenced this pull request Aug 20, 2021
wewoor added a commit that referenced this pull request Aug 20, 2021
@wewoor wewoor restored the test/extensionService branch August 20, 2021 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactor unit test The PR is for the unit test mainly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants