Skip to content

Conversation

@vanesa
Copy link
Contributor

@vanesa vanesa commented Apr 23, 2019

Use the Sourcegraph stubs api for testing, improve repo matching.

@vanesa vanesa requested a review from lguychard April 23, 2019 23:59
})

describe('check for extension activation', () => {
it('activate extension', () => expect(activate(sourcegraph.ExtensionContext)).toEqual(void 0))

Choose a reason for hiding this comment

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

This works in that it checks that the extension's activate function does not crash when called. However it doesn't test much beyond that. I would add more comprehensive tests for the actual functionality, for instance:

  • The extension reacts to windows/editor changes and decorates editors accordingly
  • The extension reacts to configuration changes and decorates editors accordingly

@vanesa vanesa marked this pull request as ready for review May 8, 2019 22:08
@codecov-io
Copy link

codecov-io commented May 9, 2019

Codecov Report

Merging #13 into master will increase coverage by 9.39%.
The diff coverage is 90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #13      +/-   ##
==========================================
+ Coverage   75.72%   85.12%   +9.39%     
==========================================
  Files           3        3              
  Lines         103      121      +18     
  Branches       20       29       +9     
==========================================
+ Hits           78      103      +25     
+ Misses         25       18       -7
Impacted Files Coverage Δ
src/settings.ts 100% <ø> (ø) ⬆️
src/handler.ts 100% <100%> (+17.5%) ⬆️
src/extension.ts 74.64% <73.91%> (+4.15%) ⬆️

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 b49a375...622bf92. Read the comment docs.

vanesa and others added 3 commits May 13, 2019 09:34
Co-Authored-By: Felix Becker <felix.b@outlook.com>
Co-Authored-By: Felix Becker <felix.b@outlook.com>
Co-Authored-By: Felix Becker <felix.b@outlook.com>
@vanesa vanesa changed the title add more tests, extend the mock API to test activate add more tests, use the Sourcegraph stubs api and improve repo matching. May 13, 2019
@vanesa vanesa requested a review from felixfbecker May 15, 2019 19:11
@vanesa vanesa requested a review from felixfbecker May 16, 2019 05:04
Loïc Guychard and others added 4 commits May 21, 2019 12:19
linePatterns, repositories and files were typed as RegExp[], but the user would have actually entered them as string[]. Having them typed as RegExp[] hid potential bugs where their real type would not have been handled properly.
@vanesa vanesa merged commit 7e69ceb into master May 21, 2019
@vanesa vanesa deleted the vo/increase-test-coverage branch May 21, 2019 19:38
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.

7 participants